What is the average journey length in seconds

Assignment Help Database Management System
Reference no: EM131955654

Assignment: Database Systems and Information Modelling

The Case

You are the SQL programmer for a company that operates a (fictional) city subway system. Your job is to write SQL queries that answer questions posed by management.

The subway has three train lines, named "Northern", "Western" and "Eastern", each of which starts at the "City" station. Along each line are several stations. Each station has an id and a name, and a sequence number along the line. On a given line, station 0 is City, station 1 is the ‘first' station travelling outbound etc., until the station furthest from the city, which has the highest sequence number. The subway map in figure 1 shows the three lines and the stations on each line. Since the city station is on all lines, it is marked as being on line ‘0' (note that there is not an actual line 0).

1. How many usernames contain the letter A?

2. What is the average journey length, in seconds?

3. List the stations on the Eastern line (excluding City), in outbound order.

4. On which day of the week (Monday, Tuesday etc.) are the most journeys made?

5. List any stations at which no passenger has started or ended a journey. Show the station id and name.

6. List the details of each journey, along with its cost.

7. List the station ids, along with the number of journeys that started or stopped at each station.

8. List the journeys that ended at the last station on the line. (the station with the highest sequence number for a line)

9. For each journey, show how many stations it passed through. (Count the end station but not the start station.)

10. List the usernames of customers who have travelled on all lines.

Attachment:- Assignment.rar

Reference no: EM131955654

Questions Cloud

Kinetic energy if they started from rest : What is their kinetic energy if they started from rest? Give your answer in joules and electron volts.
What is the expected annual loan constant : How much can be borrowed? What is the expected annual loan constant?
Define the concept think profit in your own words : For the first discussion this week, define the concept: Think Profit in your own words. Please answer the question completely
Who are entitled to the dividend : Caterpillar (CAT) announced on Dec. 12, 2012 that it would pay a last quarter dividend of $0.52 on Dec. 31, 2012. The date of record was Dec. 24, 2012.
What is the average journey length in seconds : What is the average journey length, in seconds? List the stations on the Eastern line (excluding City), in outbound order.
Calculate the present worth cost today : calculate the present worth cost (PWC) today (time zero) for each option.
Server management with linux commands : System Administration - Write down your understanding on this in your own words in one paragraph - Server management systems and tools
Write a research paper on can dying languages be revitalized : Write a research paper on Can dying languages be revitalized? it should be 8-10 pages longshould contain a body paragraphthesisconclusion at the end.
What is the mass of the canoe : He walks along the length of the canoe at 0.49 m/s, relative to the water, and the canoe simultaneously moves in the opposite direction at 0.19 m/s.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd