Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

urgent pls The relational schemas below show the details about the train journey from Kuala Lumpur Central Station to many destinations in Malaysia. TRAIN (TrainCode,

image text in transcribed

urgent plsimage text in transcribed

The relational schemas below show the details about the train journey from Kuala Lumpur Central Station to many destinations in Malaysia. TRAIN (TrainCode, TrainName, TrainCapacity, Train Model) JOURNEY (JourneyID, TrainCode, Station Code. AgeCategory, TicketPrice) STATION (Station Code, StationName, Station Distance) Write SQL statement for the following questions: i. Create JOURNEY table (5 marks) ii. Add one new row to the TRAIN table that consists of the following data: Train code T2022 Train name : Ekspress SinarSuria Capacity : 200 Model : Scania880 (2 marks) iii. Find the names of all stations that fall within 10 kilometers from Kuala Lumpur Central Station. (3 marks) iv Find how many journeys each train makes to different stations. Sequence and group it the output according to the train code. (3 marks) v Find the name of train and station which has the highest ticket price for child category (5 marks) VI. Display the train code, train name and station name for all trains whose capacity is equal or greater than 100 passengers. Sequence the results according to station names in descending order. (5 marks) vii. Delete train T1010. (2 marks)

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

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

b. What is the probability that the family has four children?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago