Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

Need to select two distinct columns in my recordset

I have one table named AttendanceGrid:

Here are an example of the data and column names

Name   Activity   Start          Stop       Month      Notes

Bobby      Tennis    12:00pm   2:00pm   January     None
Timmy     Tennis    12:00pm   2:00pm   February     None
Joyce        Tennis    1:00pm    3:00pm    February     None
Dennis     Tennis    12:00pm   2:00pm   January     None
Sue          Tennis    1:00pm     3:00pm   January     None
Bart         Soccer   12:00pm   2:00pm   January     None

I would like to select Distinct Activity records associated with the Start and Stop Time.  For example if I selected distinct Activity associated with Start and Stop times I should be able to pull up the following:

Tennis   12:00pm  2:00pm
Tennis   1:00pm    3:00pm
Soccer   12:00pm   2:00pm

How can I write an SQL statement to do that?  I am quite novice to SQL code
ASKER CERTIFIED SOLUTION
Avatar of nishant joshi
nishant joshi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of al4629740

ASKER

What does the Max in  MAX(Start) mean?
max which is an aggregate function.
what does it do?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial