Skip to main content

SQL Set Operators

SQL Set Operators   Traditional Set Operators: Union Compatibility:     Requirement for the traditional set operators.    Strong requirement.                         - Same number of columns.                         - Each corresponding column is compatible.                         - Positional correspondence.     Apply to similar tables by removing columns first. SQL UNION Example:           Example 1: Retrieve basic data about all university people.                     SELECT FacNo AS PerNo, FacFirstName                                      ...

Database Queries

 You will write SELECT statements that retrieve some information from the following populated tables. This assignment uses intercollegiate athletic database and builds on what you have already created during your course work.

Event Plan Table




EventPlan Line

    




Event Request Table


Resource Table



Facility Table

                                                        facno             Facname
                                                        F100              Football stadium
                                                        F101              Basketball arena
                                                        F102              Baseball field
                                                        F103              Recreation room

Location Table

                                                        locno             facno             locname
                                                        L100              F100              Locker room
                                                        L101              F100              Plaza
                                                        L102              F100              Vehicle gate
                                                        L103              F101              Locker room
                                                        L104              F100              Ticket Booth
                                                        L105              F101              Gate
                                                        L106              F100              Pedestrian gate



a. List the event number, event date, status, and estimated cost of events where there is an event plan managed by Mary Manager and the event is held in the basketball arena in the period October 1 to December 31, 2018. Your query must not use the facility number (“F101”) of the basketball arena or the employee number (“E101”) of “Mary Manager” in the WHERE clause. Thus, the WHERE clause should not have conditions involving the facility number or employee number compared to constant values.


Query Formulation + Result Snapshot





















Our Official Website : Web Conquerors (https://www.webconquerors.com/) 

Want to get digital services? Contact US

Want to know about our services? Our Services


Comments

Popular posts from this blog

SQL Set Operators

SQL Set Operators   Traditional Set Operators: Union Compatibility:     Requirement for the traditional set operators.    Strong requirement.                         - Same number of columns.                         - Each corresponding column is compatible.                         - Positional correspondence.     Apply to similar tables by removing columns first. SQL UNION Example:           Example 1: Retrieve basic data about all university people.                     SELECT FacNo AS PerNo, FacFirstName                                      ...

Query Formulation

Query Formulation   Query Formulation Process: Critical Questions: What tables?           - Columns in result.          - Conditions to test (including join conditions). How to combine the tables?           - Usually join of PK to FK. More complex ways to combine Individual rows or groups of rows?           - Aggregate functions in result.          - Conditions with aggregate functions. University Database Diagram: Summarization and Joins 1:      Example 1: List the number of students enrolled in each 2017 course offering showing the offer number and number of students in the result.                SELECT Offering.OfferNo,                                     COUNT (*) AS NumSt...

Sorting Operations

  Kinds Of Sorting Operations ·          Bubble Sort Bubble sort is a type of sorting. It is used for sorting 'n' (number of items) elements. It compares all the elements one by one and sorts them based on their values. The above diagram represents how bubble sort actually works. This sort takes O (n 2 ) time. It starts with the first two elements and sorts them in ascending order. Bubble sort starts with first two elements. It compares the element to check which one is greater.   ·          Insertion Sort Insertion sort is a simple sorting algorithm. This sorting method sorts the array by shifting elements one by one. It builds the final sorted array one item at a time. Insertion sort has one of the simplest implementation. This sort is efficient for smaller data sets but it is insufficient for larger lists. It has le...