Write Queries for the questions below using SQL Question 1: Count the number of employees per company ID Question 2: Pro

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write Queries for the questions below using SQL Question 1: Count the number of employees per company ID Question 2: Pro

Post by answerhappygod »

Write Queries for the questions below using SQL
Question 1: Count the number of employees per
company ID
Question 2: Provide all active company names
and their admin’s corresponding state
Question 3: What is the average monthly revenue
of all contracts?
Question 4: Per company ID, provide the name of
their first employee based on their name’s alphabetical
order
Question 5: Provide a list of employees and
admins, and their corresponding company name
Write Queries For The Questions Below Using Sql Question 1 Count The Number Of Employees Per Company Id Question 2 Pro 1
Write Queries For The Questions Below Using Sql Question 1 Count The Number Of Employees Per Company Id Question 2 Pro 1 (157.37 KiB) Viewed 15 times
+Table Name: Companies Column Name Column Type company (PK) BIGINT company Name VARCHAR(256) isActive BOOLEAN contractAmount DECIMAL (16,2) contractLength VARCHAR(16) Table Name*: Company_Admin Column Name Column Type adminID (PK) BIGINT company BIGINT admin Name VARCHAR(256) adminState VARCHAR(2) adminEmail VARCHAR(256) Table notes*: Admins are not considered employees Each company has one admin Table Name: Employee_Registree Column Name Column Type employeelD (PK) BIGINT companyID BIGINT employee Name VARCHAR(256) employee State VARCHAR(2) Appendix A Nullable? N N Y N N Nullable? N N N Y N Nullable? N N N Y Value Definitions Unique Identifier 0 = Not active, 1 = Active, NULL = unknown Amount of a company contract, based on contract length Contract length, either 'monthly', 'quarterly', or 'yearly' Value Definitions Unique Identifier Join key First and last name 2-letter state abbreviation Value Definitions Unique Identifier Join key First and last name 2-letter state abbreviation
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply