0% found this document useful (0 votes)
4 views14 pages

CS SQL

The document outlines a series of aims to implement queries using Data Definition Language (DDL) and Data Manipulation Language (DML) in a database. It includes creating and modifying tables, entering records, and performing various data retrieval operations with specific conditions and aggregate functions. The tasks cover a range of queries such as displaying records, calculating averages, and filtering data based on attributes.

Uploaded by

arpatil.2311.ap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views14 pages

CS SQL

The document outlines a series of aims to implement queries using Data Definition Language (DDL) and Data Manipulation Language (DML) in a database. It includes creating and modifying tables, entering records, and performing various data retrieval operations with specific conditions and aggregate functions. The tasks cover a range of queries such as displaying records, calculating averages, and filtering data based on attributes.

Uploaded by

arpatil.2311.ap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Aim: To Implement Queries based on DDL (Part-1)

a) Create database

b) Create a table student


c) Modify table student
i. Make Aadhar No as primary key

ii. Add new attribute DOB (date of birth)

iii. Delete attribute Cellno and Stid


Aim: To Implement Queries based on DDL (Part-2)

a) Create a table marks


Aim: To Implement Queries based on DML

a) Enter 8 records in table student


b) Enter records in table marks

c) Enter percentage in student table


Aim: To implement Queries of data retrieval by using clauses and aggregate functions

a) Display all records from student table and marks table independently

b) Display name and hobby of each student

c) Display name of students which are fail


d) Display highest and lowest percentage

e) Display name of students who do not have hobby

f) Display name and percentage of each student in descending order of marks


g) Display highest marks of physics, maths, and chemistry respectively
h) Display average marks of maths, physics, and chemistry respectively

i) Display different hobbies (unique hobby)

j) Display No. of students in each hobby


k) Display Cartesian product of two tables

l) Display name, id, and DOB from eldest to youngest:


m) Display Aadhar No of a particular student

n) Display count of students whose marks are between 50 to 70

o) Display name of students having hobby dance and music


p) Display both tables using join (natural join and equi join):

q) Display name of students starts from 'm' or 's':

r) Display name whose second character is 'a'

s) Display name of 5 characters and ends with 'e' character

You might also like