Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

vrite the sql queries for - the years when more than 10 cars where sold 2- the car models sold more than 10 cars in

image text in transcribed
vrite the sql queries for - the years when more than 10 cars where sold 2- the car models sold more than 10 cars in one year 3- the customers registered or not with their icense number and loyalty points 4- the rented cars that will be returned before end of march able structure: create table car(car_id int, brand varchar(10),model varchar(10),color varchar(10), rental_category varchar(10), selling price int, primary key car_id)); create table customer(customer_id int, name archar(15),date_of_birth date primary key(customer_id)); create table registered (customer_id nt, liscense_number int, loyalty_points int, primary key(customer_id),foreign key (customer_id) references customer(customer_id)); create table registered_tel(customer_id int, name number int, primary key(customer_id, number), foreign Key(customer_id) references customer(customer_id)); create table buy (customer_id int,car_id nt date date,cc_number int.cc_expiry_date date,cc_security_code int, primary key (customer_id, car_id, date ), foreign key (customer_id) references customer(customer_id), foreign key (car_id) eferences car(car_id)); create table rent(customer_id int,car_id nt rental_date date, retur_date date, primary key( customer_id, car_id, rental_date), foreign key(customer_id) references customer (customer_id), foreign key (car_id) eferences car(car_id)); vrite the sql queries for - the years when more than 10 cars where sold 2- the car models sold more than 10 cars in one year 3- the customers registered or not with their icense number and loyalty points 4- the rented cars that will be returned before end of march able structure: create table car(car_id int, brand varchar(10),model varchar(10),color varchar(10), rental_category varchar(10), selling price int, primary key car_id)); create table customer(customer_id int, name archar(15),date_of_birth date primary key(customer_id)); create table registered (customer_id nt, liscense_number int, loyalty_points int, primary key(customer_id),foreign key (customer_id) references customer(customer_id)); create table registered_tel(customer_id int, name number int, primary key(customer_id, number), foreign Key(customer_id) references customer(customer_id)); create table buy (customer_id int,car_id nt date date,cc_number int.cc_expiry_date date,cc_security_code int, primary key (customer_id, car_id, date ), foreign key (customer_id) references customer(customer_id), foreign key (car_id) eferences car(car_id)); create table rent(customer_id int,car_id nt rental_date date, retur_date date, primary key( customer_id, car_id, rental_date), foreign key(customer_id) references customer (customer_id), foreign key (car_id) eferences car(car_id))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions