Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Database Management System) solve this in mysql TABEL: RIDER rdr_id rname vehicle vtype join_date total_rides income distance 1 Abrar Fahim Honda Civic 20-03-2020 75 87000

(Database Management System)

image text in transcribed

image text in transcribed

solve this in mysql

TABEL: RIDER rdr_id rname vehicle vtype join_date total_rides income distance 1 Abrar Fahim Honda Civic 20-03-2020 75 87000 1200 2 Jafar Ahmed Yamaha R15 B 12-01-2020 55 60000 900 3 Jannatul Lamia Toyota Prius 04-04-2020 30 33000 350 4 Tanvir Ahmed Yamaha Pulsar B 01-12-2019 105 100000 1370 5 Shahriar Alam Bajaj Discover B 25-01-2020 5 1000 80 6 Ashfaq Nabid UM Sport B 28-09-2020 1 350 22 7 SM Sayem Toyota Corolla 08-08-2020 15 5200 190 8 Golam Haider Vespa B 16-03-2020 45 52000 650 TABEL: PASSENGERS pid pname join_date 1 Shahriar Chowdhury 02-01-2020 2 Jamal E Mollah 21-10-2019 3 Alvi Hossain 12-11-2019 4 Tonmoy Jaman 27-01-2020 5 Toukir Munshi 02-12-2019 6 Yakub Noby 24-12-2019 7 Mithila Rahman 27-02-2020 8 Jobbar Sheikh 14-03-2020 9 Chunnu Wahidul 07-06-2020 10 Rakib Hasan 29-08-2020 TABEL: RIDES TODAY rd_id rdr_id pid distance bill 1 1 7 14.3 480 2 2 10 1.3 40 3 4 2 8.9 110 4 5 4 15.5 260 5 7 3 5.1 250 6 1 7 14.3 510 7 1 1 9.5 330 8 7 6 5.5 280 9 8 10 8.2 140 10 4 8 5.7 90 11 2 2 3.4 90 12 8 6 12.5 165 13 4 8 15.6 250 14 3 6 8.5 290 15 4 2 5.1 70 9. [2 Points] Add new column in named plevel in PASSENGERS table with int datatype. [Don't need explanation) 10. [6 Points] Update the PASSENGERS table's level column using the following conditions. All the rows should be updated upon executing the query once. a. If join_date is before 01-01-2020 then level = 3 b. If join_date is before 01-07-2020 then level = 2 c. Else level = 1 11. [8 Points] Create a trigger for inserting new rows in the PASSENGERS table. The trigger will insert levels based on the join_date

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions