First I would like to thank anyone that helps me with this question.
I am looking for a query that will return one row of data for each person based on the “IssuedTo” column. Let me explain:
I have two tables and the first is the “Tickets” table and the second is the “People” table. Below are the two tables.
Tickets:
Expand|Select|Wrap|Line Numbers
- KeyID IssuedTo Sold
- 1 1 False
- 2 3 False
- 3 1 False
- 4 2 False
- 5 2 False
- 6 3 False
- 7 3 False
- 8 2 False
- 9 1 False
- 10 3 False
Expand|Select|Wrap|Line Numbers
- KeyID Name
- 1 Sam
- 2 Kim
- 3 Dave
This is the query that I have so far:
Expand|Select|Wrap|Line Numbers
- SELECT b.Name as 'Ticket Owner', a.KeyID as 'Lowest Ticket#', a.KeyID as 'Highest Ticket#' FROM Tickets a JOIN People b ON (a.IssuedTo = b.KeyID)
Expand|Select|Wrap|Line Numbers
- Ticket Owner Lowest Ticket# Highest Ticket#
- Sam 1 9
- Dave 2 10
- Kim 4 8
Again; thanks for the help,
CroCrew~