0% found this document useful (0 votes)
2 views1 page

SQL Day1

The document outlines a SQL table structure for bank details and provides a single record insertion. It includes tasks to analyze the data, such as calculating the sum and average of balances, identifying individuals with minimum and maximum balances, and filtering records based on specific criteria like job roles and education levels. The tasks aim to extract insights from the bank_details table.

Uploaded by

Nikhitha R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

SQL Day1

The document outlines a SQL table structure for bank details and provides a single record insertion. It includes tasks to analyze the data, such as calculating the sum and average of balances, identifying individuals with minimum and maximum balances, and filtering records based on specific criteria like job roles and education levels. The tasks aim to extract insights from the bank_details table.

Uploaded by

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

create table bank_details (

age int,
job varchar(30),
marital varchar(30),
education varchar(30),
default varchar(30),
balance int,
housing varchar(30),
loan varchar(30),
contact varchar(30),
day int,
month varchar(30),
duration int,
campaign int,
pdays int,
previous int,
poutcome varchar(30),
y varchar(30) )

insert into bank_details


values(58,"management","married","tertiary","no",2143,"yes","no","unknown",5,"may",
261,1,-1,0,"unknown","no")

TASK

with this data try to fine out sum of balance


Try to find out avarage of balance
try to find out who is having a min balance
try to find out who is having a mazxmim balance
try to prepare a list of all the person who is having loan
try to find out average balance for all the people whose job role is admin
try to find out a record without job whose age is below 45
try to find out a record where education is primarty and person is jobless
try to find of a record whose bank account is having a negative balance
try to find our a record who is not having house at all along with there balance

You might also like