hi,

let consider,

A table has following fields,

name
amount
date

I know to get sum of amount based for particular date

condition be..

select sum(amount) as val from table_name where date='06-16-2010'

Same as I want to get list of name for a particular date.

How can I achieve this..

for particular date

select date,sum(amount) as val from table_name where date='2010-06-16' group by date

for particular date and name

select name,date,sum(amount) as val from table_name where date='2010-06-16' and name ='myname' group by name,date
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.