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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -