Showing posts with label corresponding. Show all posts
Showing posts with label corresponding. Show all posts

Friday, March 23, 2012

Help with SELECT query

My SELECT query returns a data set, one column of which contains a set
of values corresponding to the same date. I.e. for each date in column
"Date", I have a set of numbers in column "Numbers". However, I am
only interested in getting the largest value in column "Numbers"
corresponding to each value in column "Date". How do I do that?
Thanks,

Marcomdi00@.hotmail.com (Marco) wrote in news:e5f1d809.0411190312.c9f8b07
@.posting.google.com:

> My SELECT query returns a data set, one column of which contains a set
> of values corresponding to the same date. I.e. for each date in column
> "Date", I have a set of numbers in column "Numbers". However, I am
> only interested in getting the largest value in column "Numbers"
> corresponding to each value in column "Date". How do I do that?
> Thanks,
> Marco

SELECT "Date", MAX("Numbers")AS "Largest number"
FROM sometable
GROUP BY "Date"|||Marco wrote:

> My SELECT query returns a data set, one column of which contains a set
> of values corresponding to the same date. I.e. for each date in column
> "Date", I have a set of numbers in column "Numbers". However, I am
> only interested in getting the largest value in column "Numbers"
> corresponding to each value in column "Date". How do I do that?
> Thanks,
> Marco

Look up MAX and GROUP BY.

Monday, February 27, 2012

Help with my first report!

Hi Team,

I am trying to create my first report here. My report will show the employee name with corresponding order assigned to them. I already created one datasets which returned the employee name, then I created another one which take the employee name and returned count of the order.

My questions is:

1) is that possible to passing the parameter from the first datasets which contain of customer name?

2) is there any better way of doing this (maybe using one datasets instead of two).

Any respond I will really appreciate.

Anyone please!|||

Make one dataset with query like this:

select empName, count(orderID) as orderCount
from employees
inner join orders on employees.name = orders.employeeName

But better if you use employee ID rather than his name for joining tables.

|||Thank you.