Jump to content

Crazy query help.


programistas

Recommended Posts

hey, thanks in advance if someone can help me :)

 

x      y      auto

 

 

1      2      a

5      3      b

4      6      c

1      2      d

7      7      e

4      6      f

5      3      b

9      4      h

4      6      f

 

 

I need  query to get from table auto_history(x, y, auto) only these cars,

that are in the same place with other cars

 

 

The result must be :

 

a - because  (it has x=1 and y=2    AND      d has also x=1 and y=2), so they are in the same place

d - because (it has x=1 and y=2  and    a has also x=1 and y=2), so they are in the same place

....

 

so, that's what my sql result must give

a, c, d, f

 

Link to comment
https://forums.phpfreaks.com/topic/231456-crazy-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.