The document contains SQL statements that create tables, insert data, and perform queries on two tables: book and member. It also creates a Gym table, inserts data, and performs additional queries on the Gym table. The tables store information about books, book borrowers, and gym members. Queries are performed to return book information, member details based on borrow date, gym members meeting criteria like fees paid and gender, and aggregations on the Gym table.
The document contains SQL statements that create tables, insert data, and perform queries on two tables: book and member. It also creates a Gym table, inserts data, and performs additional queries on the Gym table. The tables store information about books, book borrowers, and gym members. Queries are performed to return book information, member details based on borrow date, gym members meeting criteria like fees paid and gender, and aggregations on the Gym table.
The document contains SQL statements that create tables, insert data, and perform queries on two tables: book and member. It also creates a Gym table, inserts data, and performs additional queries on the Gym table. The tables store information about books, book borrowers, and gym members. Queries are performed to return book information, member details based on borrow date, gym members meeting criteria like fees paid and gender, and aggregations on the Gym table.
Insert into book values("F101","The Priest","Fiction");
Insert into book values("L102","German Easy","Literature"); Insert into book values("C101","Tarzan in The Lost World","Comic"); Insert into book values("F102","Untold Story","Fiction"); Insert into book values("C102","War Heroes","Comic");
Insert into member values("M101","Raghav Sinha","L102","2016-10-13");
Insert into member values("M103","Sarthak John","F102","2017-02-23"); Insert into member values("M102","Anisha Khan","C101","2016-06-12");
select*from member order by IssuedDate desc;
Select Code ,BName from book
where Type="Fiction";
Select Type,Count(Code) From Book
group by Type;
Select MName,IssuedDate from member
where IssuedDate Like"%2017%";
Create Table Gym(Mcode int(3),
MName char(10), Gender Varchar (10), Age int(5), FeeGiven int(10), Type varchar(20) DtAdmit date);
Insert into gym values(1,"Amit","Male",35,6000,"Monthly","2016-01-23");
Insert into gym values(2,"Rashmi","Female",25,8000,"Monthly","2016-09-23"); Insert into gym values(3,"George","Male",42,24000,"Yearly","2011-06-27"); Insert into gym values(4,"Fawad","Male",27,12000,"Quarterly","2012-10-16"); Insert into gym values(5,"Samit","Male",54,6000,"Monthly","2015-09-20"); Insert into gym values(6,"Laksmi","Female",43,4500,"Monthly","2016-01-15"); Insert into gym values(7,"Samita","Female",22,500,"Guest","2017-01-23"); Insert into gym values(8,"Michael","Male",51,24000,"Yearly","2013-07-18"); Insert into gym values(9,"DayaChand","Male",44,100000,"Life","2012"); Insert into gym values(10,"Ajit","Male",33,12000,"Quarterly","2015-06-26");