create table Patients (ID int, Name varchar(20), Date date, ShotAmount int) insert into…
Jump to turn (8)
- 1create table Patients (ID int, Name varchar(20), Date date, ShotAmount int) inse
- 2Find first and last shot dates for each customer with their amount (in different
- 3Find third date each customer got the shot (shot date, amount, id, name)
- 4Find all the shot information where each patient got the highest amount of their
- 5Find all the shot information where each patient got the least amount of their s
- 6Find the second highest shot all information for each customer (all columns)
- 7--6.for each customer the least amount of shots' all information for each year.
- 8it's not working on all of them it's giving error on extract
- User
create table Patients (ID int, Name varchar(20), Date date, ShotAmount int) insert into Patients values (101, 'Anna', '2022-01-01', 80), (101, 'Anna', '2022-01-05', 75), (101, 'Anna', '2022-01-10', 90), (101, 'Anna', '2023-01-01', 81), (101, 'Anna', '2023-01-06', 86), (101, 'Anna', '2023-01-15', 80), (102, 'Nancy', '2022-01-01', 80), (102, 'Nancy', '2022-01-05', 75), (102, 'Nancy', '2022-01-18', 90), (102, 'Nancy', '2023-01-01', 81), (102, 'Nancy', '2023-01-06', 86), (102, 'Nancy', '2023-01-11', 80), (103, 'Alli', '2022-01-09', 80), (103, 'Alli', '2022-01-11', 75), (103, 'Alli', '2022-01-30', 90), (103, 'Alli', '2023-01-04', 81), (103, 'Alli', '2023-01-14', 86), (103, 'Alli', '2023-01-28', 80) select * from Patients
- Assistant