Make at least 20 sql statements from the table script given (try to make a little complex script) .please make scripts as related to given categories below:(script to make table is given below) create database kapil; create table Books( Book_id varchar (30)NOT NULL Primary key, Book_name varchar (80), Edition_no varchar (20), category_835757 varchar(20), price decimal(5,2) ); INSERT into books values (1,'Specs','12th','Philosophy',35.11); INSERT into books values (2,'Oxford','25th','Dictionary',20.12); INSERT into books values (3,'Revolution','9th','Novel',10.15); INSERT into books values (4,'Ghost in wires','8th','Crime',13.52); INSERT into books values (5,'Burned','4th','Encyclopedia',15.22); create table Reader( Userid_757 varchar(50) NOt NULL Primary key, Last_name varchar(100), First_name varchar (200), Phone varchar(100), Email varchar(200), Book_id int ); INsert into reader values('U513','Mahara','Kapil',647-555-1151,'Phantomconflicted.com',003); INSERT into reader values ('U514','Bhatta','Bikas',434-568-1051,'bikas434@yahoo.com',001); INSERT into Reader Values ('U515','Ford','Richard',134-091-5122,'ford22.com',002); Insert into Reader values ('U516','Bhattarai','Bikram',647-887-2078,'everesl.com',005); INSERT into reader values ('U517','Bhoj','Biraj',603-788-1072,'regmi.com',004); create table Booking ( Booking_id varchar(100) NOT NULL PRIMARY key , Booking_date date , Return_date date, User_id varchar(100) ); Insert into Booking values ('B011','22-JAN-2021','23-JAN-2021','U513'); Insert into Booking values ('B012','22-JAN-2021','24-FEB-2021','U514'); Insert into Booking Values ('B013','24-JAN-2021','28-JAN-2021','U515'); Insert into Booking values ('B014','25-JAN-2021','27-JAN-2021','U516'); Insert into Booking Values ('B015', '28-JAN-2021','02-FEB-2021','U517'); create table payment ( Payment_id varchar (100) Not null primary key, Payment_date date , Amount decimal(5,2), User_id varchar (100) ); INSERT INTO payment values ('P115','22-JAN-2021',10.15,'U513'); INSERT into payment values ('P116','22-JAN-2021',35.11,'U514'); INSERT INTO payment values ('P117','24-JAN-2021',20.12,'U515'); INSERT INTO payment values ('P118','25-JAN-2021',15.22,'U516'); INSERT INTO payment values ('P119','28-JAN-2021',13.52,'U517');

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Make at least 20 sql statements from the table script given (try to make a little complex script) .please make scripts as related to given categories below:(script to make table is given below)

create database kapil;

create table Books(
Book_id varchar (30)NOT NULL Primary key,
Book_name varchar (80),
Edition_no varchar (20),
category_835757 varchar(20),
price decimal(5,2)
);
INSERT into books
values (1,'Specs','12th','Philosophy',35.11);
INSERT into books
values (2,'Oxford','25th','Dictionary',20.12);
INSERT into books
values (3,'Revolution','9th','Novel',10.15);
INSERT into books
values (4,'Ghost in wires','8th','Crime',13.52);
INSERT into books
values (5,'Burned','4th','Encyclopedia',15.22);


create table Reader(
Userid_757 varchar(50) NOt NULL Primary key,
Last_name varchar(100),
First_name varchar (200),
Phone varchar(100),
Email varchar(200),
Book_id int
);
INsert into reader
values('U513','Mahara','Kapil',647-555-1151,'Phantomconflicted.com',003);
INSERT into reader
values ('U514','Bhatta','Bikas',434-568-1051,'bikas434@yahoo.com',001);
INSERT into Reader
Values ('U515','Ford','Richard',134-091-5122,'ford22.com',002);
Insert into Reader
values ('U516','Bhattarai','Bikram',647-887-2078,'everesl.com',005);
INSERT into reader
values ('U517','Bhoj','Biraj',603-788-1072,'regmi.com',004);


create table Booking (
Booking_id varchar(100) NOT NULL PRIMARY key ,
Booking_date date ,
Return_date date,
User_id varchar(100)
);
Insert into Booking
values ('B011','22-JAN-2021','23-JAN-2021','U513');
Insert into Booking
values ('B012','22-JAN-2021','24-FEB-2021','U514');
Insert into Booking
Values ('B013','24-JAN-2021','28-JAN-2021','U515');
Insert into Booking
values ('B014','25-JAN-2021','27-JAN-2021','U516');
Insert into Booking
Values ('B015', '28-JAN-2021','02-FEB-2021','U517');


create table payment (
Payment_id varchar (100) Not null primary key,
Payment_date date ,
Amount decimal(5,2),
User_id varchar (100)
);
INSERT INTO payment
values ('P115','22-JAN-2021',10.15,'U513');
INSERT into payment
values ('P116','22-JAN-2021',35.11,'U514');
INSERT INTO payment
values ('P117','24-JAN-2021',20.12,'U515');
INSERT INTO payment
values ('P118','25-JAN-2021',15.22,'U516');
INSERT INTO payment
values ('P119','28-JAN-2021',13.52,'U517');

> Combination of logical operators
e.g. Select customer_name, country from customer (city ='Toronto OR city='Brampton')
AND country ='Canada'
> Order By
> Aggregate function
e.g. AVG, MIN, MAX,COUNT,SUM + with null values + with distinct values
Category D:
> Group By
> Group By Having
> Build In Functions
LOWER,UPPER,INITCAP,CONCAT,SUBSTR,INSTR,TRIM,PAD,ROUND,CEIL.
NVL.COALEASE,LISTAGG
Category E:
> Multiple Table Queries
Inner Join
Left Outer Join
Right Outer Join
Cross Join
Self-Join
Transcribed Image Text:> Combination of logical operators e.g. Select customer_name, country from customer (city ='Toronto OR city='Brampton') AND country ='Canada' > Order By > Aggregate function e.g. AVG, MIN, MAX,COUNT,SUM + with null values + with distinct values Category D: > Group By > Group By Having > Build In Functions LOWER,UPPER,INITCAP,CONCAT,SUBSTR,INSTR,TRIM,PAD,ROUND,CEIL. NVL.COALEASE,LISTAGG Category E: > Multiple Table Queries Inner Join Left Outer Join Right Outer Join Cross Join Self-Join
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY