date column

gudii9
gudii9 used Ask the Experts™
on
i have below query

select * from xyz_table where item_id='12345';

i got results with 10 columns

3rd column is purchase_activities


now i need to sort or order based on ascending date to see first activity at top to last activity at bottom

how to do it
please advise
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Developer
Commented:
what is the column with the date? Assuming it is activity_date, add order by activity_date desc after your WHERE clause.

select * from xyz_table where item_id='12345' order by activity_date desc;

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial