Week3 - Restricted and Stored Data / Assess

The questions can come in any order, so make sure you are selecting right option for all questions.

1. Write a query to display all details of the station whose name starts with the letter 'K'. Display the records in ascending order based on the name.
select * from station where name like 'K%' order by name;
2. Write a query to display details of the travel_payment whose amount is greater than 30. Display the records in ascending order based on the entry_time.
select * from travel_payment where amount>30 order by entry_time;
3. Write a query to display details of the train_arrival_time which does not have any deviation.Display the records in ascending order based on the metro_train_id.
select * from train_arrival_time where deviation=0 order by metro_train_id;

3 comments

  1. query 1

    >> SELECT *
    FROM station
    WHERE name LIKE 'K%'
    ORDER BY name ASC;
    1. fixed!!!
  2. select person_name,contact_number from travel_card order by person_name;
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.