SQL – Microsoft Access
--------------------------------------------------------------------------
Display the percent of charter trips that have co-pilots and use COUNT
------------------------------------------------------------------------------

SELECT ((COUNT(CHAR_COPILOT)/COUNT(CHAR_TRIP))*100 AS PERCENT_TRIP FROM <TABLE_NAME>
explanation:
COUNT(variable) -- counts the no of rows which dont have NULL as their value.
COUNT(*) -- returns the all rows which have null and not nulla.
COUNT(CHAR_COPILOT) gives only no of copilots which have the values (doesnt consider nulls)
COUNT(CHAR_TRIP) - gives only no of trips which have the values (doesnt consider nulls)
(COUNT(CHAR_COPILOT)/COUNT(CHAR_TRIP)) -- divides the no of copilot rows with no of total trips
then multiply with 100 to get percentage.
note: if u have any doubt, let me know.
SQL – Microsoft Access -------------------------------------------------------------------------...
SQL - Microsoft Access
---------------------------------------------------------------------
SQL- Microsoft Access List the employee number, employee last name, and pilot license type (if any) for all employees. (Hint: LEFT oUTER JOIN or OUTER JOIN must be used, because "if any"-some of them are not pilots). EMP NUM EMP TITLE EMP LNAME EMP FNAME EMP INITIAL EMP DOB EMP HIRE_DATE Click to Add 100 Mr 101 Ms. 102 Mr 103 Ms. 104 Mr 105 Mr 106 Mrs 107 Mr 108 Mr 109 Ms. 110...
Partial Question 10 1/2 pts Give the SQL statement to list the trip name and state for each trip that occurs during one of the Fall seasons that is Early Fall, Spring and Late Fall. Sort by State. Use the wildcard for the season. SELECT TripName, State FROM Trip WHERE Season LIKE '%Fall' OR SEA ORDER BY State: Answer 1: LIKE '%Fall' OR SEASON LIKE 'Spring' Answer 2: ORDER BY Partial Question 11 1/2 pts Give the SQL statement to...