Dear Team,
I need help in making a query. PLEASE HELP AS IT IS A BIT URGENT -
My Table is -
| ID | Place | Game | Player | Slot | BookingDate | Status | CreatedOn | CreatedBy |
| 1 | Gujarat | Badminton | Kesar | SL15 | 30-10-2019 06:15 | 1 | 30-10-2019 11:47 | Akash |
| 2 | Gujarat | Badminton | Kesar | SL21 | 30-10-2019 06:15 | 1 | 30-10-2019 11:48 | Pintoo |
| 3 | Gujarat | Badminton | Akash | SL21 | 30-10-2019 06:15 | 1 | 30-10-2019 11:48 | Pintoo |
| 4 | Gujarat | Badminton | Sunil | SL21 | 30-10-2019 06:15 | 1 | 31-10-2019 11:45 | Pintoo |
| 5 | Gujarat | Badminton | Akash | SL16 | 31-10-2019 06:15 | 1 | 31-10-2019 11:45 | sunil |
| 6 | Gujarat | Badminton | Pintoo | SL15 | 31-10-2019 06:15 | 1 | 31-10-2019 11:45 | Akash |
| 7 | Gujarat | Badminton | Sunil | SL15 | 31-10-2019 06:15 | 1 | 31-10-2019 11:45 | Akash |
| 8 | Gujarat | Badminton | Priya | SL15 | 31-10-2019 06:15 | 1 | 31-10-2019 11:45 | Akash |
My Requirement is ---
Inputs from user -
Location, Game, CreatedByUser
Steps -
1. For user Akash - check number of rows based on
createddate,
game (input from user),
place (input from user)
2. There is one row for 30-10-2019(createdon) with player Kesar.
There are three rows for 31-10-2019(createdon) with players Pintoo, Sunil, Priya
So, the output will be -
Location, Game, CreatedByUser
Steps -
1. For user Akash - check number of rows based on
createddate,
game (input from user),
place (input from user)
2. There is one row for 30-10-2019(createdon) with player Kesar.
There are three rows for 31-10-2019(createdon) with players Pintoo, Sunil, Priya
So, the output will be -
Booking Date : 30-10-2019
Slot : SL15
Game: Badminton - Singles
Players :[ Kesar ]
------
Booking Date : 31-10-2019
Slot : SL15
Game: Badminton - Doubles
Players :[ Pintoo, Sunil, Priya ]
Slot : SL15
Game: Badminton - Singles
Players :[ Kesar ]
------
Booking Date : 31-10-2019
Slot : SL15
Game: Badminton - Doubles
Players :[ Pintoo, Sunil, Priya ]
-
How Do I make this select query?? PLEASE GUIDE..
Govardhan PPosted Nov 18, 2019, 4:01 AM