Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-29 Thread Alexander Farber
Thank you for the advices and I have also got few answers at http://stackoverflow.com/questions/40304011/where-in-condition-and-multiple-columns-in-subquery Regards Alex

Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Alban Hertroys
On 28 October 2016 at 13:03, Alexander Farber wrote: > Hello, > > is it please possible to rewrite the SQL query > > SELECT DISTINCT ON (uid) > uid, > female, > given, > photo, > place > FROM words_social > WHERE uid I

Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Geoff Winkless
On 28 October 2016 at 12:03, Alexander Farber wrote: > is it please possible to rewrite the SQL query > > SELECT DISTINCT ON (uid) > uid, > female, > given, > photo, > place > FROM words_social > WHERE uid IN (SELECT

Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Tom Lane
Alexander Farber writes: > is it please possible to rewrite the SQL query > SELECT DISTINCT ON (uid) > uid, > female, > given, > photo, > place > FROM words_social > WHERE uid IN (SELECT player1 FROM games) >

[GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Alexander Farber
Hello, is it please possible to rewrite the SQL query SELECT DISTINCT ON (uid) uid, female, given, photo, place FROM words_social WHERE uid IN (SELECT player1 FROM games) OR uid IN (SELECT player2 FROM