Skip to content

Instantly share code, notes, and snippets.

@rjp
Created March 21, 2011 12:06
Show Gist options
  • Save rjp/879365 to your computer and use it in GitHub Desktop.
Save rjp/879365 to your computer and use it in GitHub Desktop.
scribot=# select * from (select id, wh from url where id % 10000 = 0 union select id, wh from url where wh=(select min(wh) from url) union select id, wh from url where wh=(select max(wh) from url)) as bishop;
id | wh
-------+-------------------------------
136 | 2002-08-05 15:19:59+01
10000 | 2003-11-12 13:14:19+00
20000 | 2004-12-10 10:18:29.182655+00
30000 | 2005-11-08 13:50:39.732762+00
40000 | 2006-10-17 14:24:55.249109+01
50000 | 2008-02-12 14:11:37.847876+00
60000 | 2009-02-20 22:13:40.305826+00
70000 | 2009-12-09 10:02:25.692369+00
80000 | 2011-03-21 12:01:38.949904+00
(9 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment