View the step-by-step solution to:

Thank you! (A)create a view named trip_inventory. it consists of the state and the total number of trips for each state.

This question was answered on Jul 20, 2016. View the Answer

Hello can you please help me with these questions, SQL script is attached.  Thank you!

1.  (A)create a view named trip_inventory. it consists of the state and the total number of trips for each state. use UNITS as the column name for the total number of trips for each state. group and order the rows by state.

(B) write and execute the command to retrieve the state and units for each state having more than 10 trips.

(C) write and execute the query that the DBMS actually executes.


2. write and execute the commands to obtain the following information from the system catalog.

(A) list every column in the GUIDE table and its associated data type. 

(B) list every table that contains a column named trip_id.

(C) list the table name, column name, and data type for the columns named trip_id, trip_name, and type. order the results by table name within column name. (that is, column name is the major sort key and table name is the minor sort key).

CreateColonial.zip - Preview not available
Sign up to view the entire interaction

Top Answer

Here's the explanation you needed for... View the full answer

SQL.TXT

Q1 -------------------------- A) CREATE VIEW AS SELECT COUNT(TRIP_ID) AS NUM, STATE FROM TRIP GROUP BY STATE B) SELECT COUNT(TRIP_ID) AS UNITS, STATE FROM TRIP GROUP BY STATE WHERE COUNT(TRIP_ID)...

This question was asked on Jul 20, 2016 and answered on Jul 20, 2016.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors and customizable flashcards—available anywhere, anytime.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access or to earn money with our Marketplace.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
  • -

    Flashcards

    Browse existing sets or create your own using our digital flashcard system. A simple yet effective studying tool to help you earn the grade that you want!

    Browse Flashcards