SQL Dumps
SQL Dumps
from flight_details
select cd.customer_id,cd.customer_name,cd.phone_no,pd.purchase_date
from customer_details cd
select c.cust_name,o.order_id,o.order_date
from customers c
select b1.boat_id,b1.boat_name
from boat_details b1
where b1.boat_id!=b2.boat_id
order by b1.boat_name;
from products p
where f.rating_value<3
order by p.productname;
select m.fullname,m.email,m.member_id,f.product_id
from members m
-- Q7 Date Of Delivery
from customers
where cust_id in (
select cust_id
from orders
where order_date!=delivery_date
order by cust_name;
-- Q8 Movie And Theatre Details
select mm.movie_name,sm.theatre_id,mm.duration
from movie_master mm
-- Q9 Chicago Flights
select f1.flight_name,f1.flight_source
from flight_details f1
where f1.flight_source!=f2.flight_source
order by f1.destination,f1.flight_name;
select m.fullname
from members m
select p.p_first_name,a.app_reason,a.app_time,b.bill_amount
from patient p
join appointment a on p.patient_id=a.patient_id
order by a.app_time;
from customers c
order by c.cust_name;
from boat_details b
where year(r.dot)=2000
select mm.movie_id,mm.movie_name,sm.show_time
from movie_master mm
select p.patient_id,p.p_first_name,p.city,p.p_age
from patient p
order by p.age;
select c.customer_id,c.customer_name,p.policy_id,p.total_amount,p.no_of_year
from customer c
select c.customer_id,c.customer_name,p.policy_id
from customer c
from policy
where policy_id in (
select policy_id
from policyenrollment
group by policy_id
having sum(no_of_year) =(
select sum(no_of_years) m
from policyenrollment
group by policy_id
)s
order by policy_name
select c.customer_name,b.total_amount
from customer_master c
where year(b.booking_date)=2018
from patient p1
where p1.patient_id!=p2.patient_id
order by p1.city;
select customer_name
from customer
where phone_number=(
select phone_number
from subscription
where recharge_date =(
select max(recharge_date)
from subscription
select
customer_id,customer_name,date_of_birth,mariral_status,gender,gurdian_name,contact_no,ema
il_id
from customer_personal_info
where upper(gender)='M' and upper(marital_status)='MARRIED'
order by customer_id;
select c.customer_id,a.account_no,concat(right(c.customer_id,3),right(a.account_no,4))
as PASSCODE
from customer_personal_info c
order by c.customer_id;
select customer_id,customer_name,date_of_birth,gurdian_name
from customer_personal_info
order by customer_id;
select
c.customer_id,c.customer_name,a.account_no,a.account_type,b.bank_name,b.ifsc_code,a.initial
_deposite,
case
else a.interest
end NEW_INTEREST
from customer_personal_info c
order by c.customer_id;
select c.customer_id,c.customer_name,a.account_no,a.initial_deposite,
case
end taxPercentage
from customer_personal_info c
order by c.customer_id;
select a.customer_id,a.account_type,a.account_number,b.bank_name
from account_info a
order by a.customer_id;
select cri.customer_id,cpi.customer_name,cpi.guardian_name,cri.reference_acc_name
from customer_reference_info cri
where upper(cri.relation)='FRIEND'
order by cri.customer_id;
from account_info
order by interest,customer_id;
select
cpi.customer_id,cpi.customer_name,a.account_no,a.account_type,a.activation_date,b.bank_nam
e
where a.activation_date='2022-04-10'
order by cpi.customer_id;
select
a.acount_no,cpi.customer_id,cpi.customer_name,b.bank_name,b.branch_name,b.ifsc_code,cpi.c
itizenship,
a.interest,a.initial_deposit
order by cpi.customer_id;
select
cpi.customer_id,cpi.customer_name,cpi.date_of_birth,cpi.guardian_name,cpi.cintact_no,cpi.mail
_id,
cri.reference_acc_name
where upper(cpi.identification_doc_type)='PASSPORT'
order by cpi.customer_id;
select cpi.customer_id,cpi.customer_name,a.account_no,a.account_type,b.bank_name
order by cpi.customer_id;
select customer_id,customer_name,gender,marital_status,
concat(customer_name,'_',gender,'_',marital_status) as UNIQUE_REF_STRING
from customer_personal_info
select account_no,customer_id,registration_date,intial_deposit
from account_info
order by account_no;
select
select customer_id
from account_info
group by customer_id,account_type