- Customer Customerid First Name Last Name Contact Profession Int Varchar 20 Varchar 20 Int Varchar 20 1 Marcus Cr 1 (233.09 KiB) Viewed 23 times
CUSTOMER CustomerID: First Name: Last Name: Contact: Profession: int varchar(20) varchar(20) int varchar(20) 1 Marcus Cr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
CUSTOMER CustomerID: First Name: Last Name: Contact: Profession: int varchar(20) varchar(20) int varchar(20) 1 Marcus Cr
CUSTOMER CustomerID: First Name: Last Name: Contact: Profession: int varchar(20) varchar(20) int varchar(20) 1 Marcus Cruz 938912 Student 2 Justine Henderson 289374 Artist 3 Lia Shelton 234322 Artist 4 Joanna Shaffer 778989 Student 5 Jonathon Sheppard 364932 Engineer TABLES TableNumber: int Details: varchar(50) 1 4 People 2 4 People Family Table 3 3 People 4 2 People 5 8 People Family Table BOOKING BookingID: int TableNumber: int Date: date Customer ID: int 1 2 2018-01-05 4 2 2 2018-02-05 1 3 1 2018-03-05 3 4 4 2018-04-05 1 5 5 2018-05-05 2 Write SQL queries to find: 1. FistName and LastName of Customers who have booked at least one table 2. FistName and LastName of Customers who have booked TableNumber=2 3. Number of times a table has been booked along with it's Details 4. Number of times a table has been booked by a Customer belonging to a particular Profession 5. FirstName and LastName of Customer(s) who booked the maximum tables 6. All the information about Customers along with their BOOKING details