On 29/05/2015 17:32, Arup Rakshit wrote: > Hi, > > Can I do the below 3 queries in a single query ? > > select * from table where number * 3 between start_value1 and end_value2; > select * from table where number * 3 between start_value2 and end_value2; > select * from table where number * 3 between start_value3 and end_value3; If they're all the same table, just use OR: ... where (number * 3 between start_value1 and end_value1) or (number * 3 between....) etc. Or am I missing something? Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@xxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general