sql - How to fetch first and last value from a table having same value in another attribute? -



sql - How to fetch first and last value from a table having same value in another attribute? -

i have table friendbook_post attributes text,id,author,type,date_time. id primary key , there many entries in table.

an author can create number of posts i.e. 'author' can same in many rows.

now want fetch first , lastly post(text) made every author according date('date_time') along date.

i trying many queries didn't got expected result.

please help me out oracle rdbms.

perhaps want this:

select fp.* friendbook_post fp bring together (select fp.author, min(fp.id) minid, max(fp.id) maxid friendbook_post grouping fp.author ) on fp.author = a.author , fp.id in (a.minid, a.maxid);

sql database oracle

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -