a) More SQL: Aggregates - Write queries in SQL using aggregates, grouping and ordering.
b) Nested sub queries and SQL updates: Write queries in SQL using concept of nested sub
queries and SQL update commands.
Here is the list of all important MySQL functions. Each function has been explained along with suitable example.
*
MySQL Group By Clause - The MySQL GROUP BY statement is used along with the SQL aggregate functions like SUM to provide means of grouping the result dataset by certain database table column(s).
*
MySQL IN Clause - This is a clause which can be used alongwith any MySQL query to specify a condition.
*
MySQL BETWEEN Clause - This is a clause which can be used alongwith any MySQL query to specify a condition.
*
MySQL UNION Keyword - Use a UNION operation to combine multiple result sets into one.
*
MySQL COUNT Function - The MySQL COUNT aggregate function is used to count the number of rows in a database table.
*
MySQL MAX Function - The MySQL MAX aggregate function allows us to select the highest (maximum) value for a certain column.
*
MySQL MIN Function - The MySQL MIN aggregate function allows us to select the lowest (minimum) value for a certain column.
*
MySQL AVG Function - The MySQL AVG aggregate function selects the average value for certain table column.
*
MySQL SUM Function - The MySQL SUM aggregate function allows selecting the total for a numeric column.
*
MySQL SQRT Functions - This is used to generate a square root of a given number.
*
MySQL RAND Function - This is used to generate a random number using MySQL command.
*
MySQL CONCAT Function - This is used to concatenate any string inside any MySQL command.
*
MySQL DATE and Time Functions - Complete list of MySQL Date and Time related functions.
*
MySQL Numeric Functions - Complete list of MySQL functions required to manipulate numbers in MySQL.
*
MySQL String Functions - Complete list of MySQL functions required to manipulate strings in MySQL.
USE IMDB -- ensures correct database is active G.docxmadlynplamondon
USE IMDB -- ensures correct database is active
GO
PRINT '|---' + REPLICATE('+----',15) + '|'
PRINT 'Read the questions below and insert your queries where prompted. When you
are finished,
you should be able to run the file as a script to execute all answers sequentially
(without errors!)' + CHAR(10)
PRINT 'Queries should be well-formatted. SQL is not case-sensitive, but it is
good form to
capitalize keywords and table names; you should also put each projected column on
its own line
and use indentation for neatness. Example:
SELECT Name,
CustomerID
FROM CUSTOMER
WHERE CustomerID < 106;
All SQL statements should end in a semicolon. Whatever format you choose for your
queries, make
sure that it is readable and consistent.' + CHAR(10)
PRINT 'Be sure to remove the double-dash comment indicator when you insert your
code!';
PRINT '|---' + REPLICATE('+----',15) + '|' + CHAR(10) + CHAR(10)
GO
GO
PRINT 'CIS2275, Lab Week 6, Question 1 [3pts possible]:
Write the query to display the name and year of birth for all people born after
1980, who have
directed at least one show (i.e. those who appear at least once in the
title_directors table).
Limit results to those who have died (who have a value in the deathYear column).
----------------------------------------------------------------------------------
------------
Columns to display: name_basics.primaryName, name_basics.birthYear
Sort in descending order by birth year.' + CHAR(10)
--
-- [Insert your code here]
--
GO
PRINT 'CIS2275, Lab Week 6, Question 2 [3pts possible]:
Show every genre of television show which has had at least one title with 500
episodes.
i.e. limit results to the titleType ''tvEpisode'' in the title_basics table, and
to titles
containing a row in the title_episode table with episodeNumber 500.
----------------------------------------------------------------------------------
------------
Columns to display: title_genre.genre
Display genre name only, and eliminate duplicate values.' + CHAR(10)
GO
--
-- [Insert your code here]
--
GO
PRINT 'CIS2275, Lab Week 6, Question 3 [3pts possible]:
Write a common table expression to identify the WORST shows: join title_basics
against title_ratings
and limit your results to those with an averageRating value equal to 1. Project
the title,
type, and startYear from title_basics; and label your CTE as BADSHOWS.
In the main query, show a breakdown of BADSHOWS grouped by type, along with the
total number of
rows for each (i.e. GROUP BY titleType)
----------------------------------------------------------------------------------
------------
Columns to display: titleType, COUNT(*)
Sort results in descending order by COUNT(*).' + CHAR(10)
GO
--
-- [Insert your code here]
--
GO
PRINT 'CIS2275, Lab Week 6, Question 4 [3pts possible]:
Identify the least popular professions. Show each profession value from the
nam.
a) More SQL: Aggregates - Write queries in SQL using aggregates, grouping and ordering.
b) Nested sub queries and SQL updates: Write queries in SQL using concept of nested sub
queries and SQL update commands.
Here is the list of all important MySQL functions. Each function has been explained along with suitable example.
*
MySQL Group By Clause - The MySQL GROUP BY statement is used along with the SQL aggregate functions like SUM to provide means of grouping the result dataset by certain database table column(s).
*
MySQL IN Clause - This is a clause which can be used alongwith any MySQL query to specify a condition.
*
MySQL BETWEEN Clause - This is a clause which can be used alongwith any MySQL query to specify a condition.
*
MySQL UNION Keyword - Use a UNION operation to combine multiple result sets into one.
*
MySQL COUNT Function - The MySQL COUNT aggregate function is used to count the number of rows in a database table.
*
MySQL MAX Function - The MySQL MAX aggregate function allows us to select the highest (maximum) value for a certain column.
*
MySQL MIN Function - The MySQL MIN aggregate function allows us to select the lowest (minimum) value for a certain column.
*
MySQL AVG Function - The MySQL AVG aggregate function selects the average value for certain table column.
*
MySQL SUM Function - The MySQL SUM aggregate function allows selecting the total for a numeric column.
*
MySQL SQRT Functions - This is used to generate a square root of a given number.
*
MySQL RAND Function - This is used to generate a random number using MySQL command.
*
MySQL CONCAT Function - This is used to concatenate any string inside any MySQL command.
*
MySQL DATE and Time Functions - Complete list of MySQL Date and Time related functions.
*
MySQL Numeric Functions - Complete list of MySQL functions required to manipulate numbers in MySQL.
*
MySQL String Functions - Complete list of MySQL functions required to manipulate strings in MySQL.
USE IMDB -- ensures correct database is active G.docxmadlynplamondon
USE IMDB -- ensures correct database is active
GO
PRINT '|---' + REPLICATE('+----',15) + '|'
PRINT 'Read the questions below and insert your queries where prompted. When you
are finished,
you should be able to run the file as a script to execute all answers sequentially
(without errors!)' + CHAR(10)
PRINT 'Queries should be well-formatted. SQL is not case-sensitive, but it is
good form to
capitalize keywords and table names; you should also put each projected column on
its own line
and use indentation for neatness. Example:
SELECT Name,
CustomerID
FROM CUSTOMER
WHERE CustomerID < 106;
All SQL statements should end in a semicolon. Whatever format you choose for your
queries, make
sure that it is readable and consistent.' + CHAR(10)
PRINT 'Be sure to remove the double-dash comment indicator when you insert your
code!';
PRINT '|---' + REPLICATE('+----',15) + '|' + CHAR(10) + CHAR(10)
GO
GO
PRINT 'CIS2275, Lab Week 6, Question 1 [3pts possible]:
Write the query to display the name and year of birth for all people born after
1980, who have
directed at least one show (i.e. those who appear at least once in the
title_directors table).
Limit results to those who have died (who have a value in the deathYear column).
----------------------------------------------------------------------------------
------------
Columns to display: name_basics.primaryName, name_basics.birthYear
Sort in descending order by birth year.' + CHAR(10)
--
-- [Insert your code here]
--
GO
PRINT 'CIS2275, Lab Week 6, Question 2 [3pts possible]:
Show every genre of television show which has had at least one title with 500
episodes.
i.e. limit results to the titleType ''tvEpisode'' in the title_basics table, and
to titles
containing a row in the title_episode table with episodeNumber 500.
----------------------------------------------------------------------------------
------------
Columns to display: title_genre.genre
Display genre name only, and eliminate duplicate values.' + CHAR(10)
GO
--
-- [Insert your code here]
--
GO
PRINT 'CIS2275, Lab Week 6, Question 3 [3pts possible]:
Write a common table expression to identify the WORST shows: join title_basics
against title_ratings
and limit your results to those with an averageRating value equal to 1. Project
the title,
type, and startYear from title_basics; and label your CTE as BADSHOWS.
In the main query, show a breakdown of BADSHOWS grouped by type, along with the
total number of
rows for each (i.e. GROUP BY titleType)
----------------------------------------------------------------------------------
------------
Columns to display: titleType, COUNT(*)
Sort results in descending order by COUNT(*).' + CHAR(10)
GO
--
-- [Insert your code here]
--
GO
PRINT 'CIS2275, Lab Week 6, Question 4 [3pts possible]:
Identify the least popular professions. Show each profession value from the
nam.
CompanyDB Problemspage 1 of 3Consider the employee database of .docxmonicafrancis71118
CompanyDB Problems page 1 of 3
Consider the employee database of Figure CompanyDB:
*************************************************
* employee (employee_name, street, city) *
* works (employee_name, company_name, salary) *
* company (company_name, city) *
* manages (employee_name, manager_name) *
*************************************************
Figure CompanyDB.
Using the course database, give an expression in SQL for each of the following queries. The expected results are indicated for each query.
a. Find the names of all employees who work for First Bank Corporation.
EMPLOYEE_NAME
--------------------
Ferris
Johnson
Laikin
Moira
Turner
b. Find the names and cities of residence of all employees who work for First Bank Corporation.
EMPLOYEE_NAME CITY
-------------------- --------------------
Ferris Westchester
Johnson Palo Alto
Laikin Culver City
Moira Kentwood
Turner Palo Alto
c. Find the names, street address, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000.
EMPLOYEE_NAME STREET CITY
-------------------- ------------------------------ --------------------
Ferris Loyola Westchester
Johnson Alma Palo Alto
Laikin Berryman Culver City
Moira Nancy Kentwood
Turner Alma Palo Alto
d. Find all employees in the database who live in the same cities as the companies for which they work.
EMPLOYEE_NAME
--------------------
August
Brooks
Curry
Hayes
Jones
Smith
e. Find all employees in the database who live in the same cities and on the same streets as do their managers.
EMPLOYEE_NAME
--------------------
Curry
Lindsay
Turner
Williams
f. Find all employees in the database who do not work for First Bank Corporation
EMPLOYEE_NAME
--------------------
Adams
August
Brooks
Curry
Glenn
Green
Hayes
Jones
Lindsay
Schmidt
Smith
Williams
Young
g. Find all employees in the database who earn more than every employee of Small Bank Corporation.
EMPLOYEE_NAME SALARY
-------------------- ---------
August 150000.00
Schmidt 120000.00
h. Assume that the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located
COMPANY_NAME
------------------------------
Small Bank Corporation
i. Find all employees who earn more than the average salary of all employees of their company.
EMPLOYEE_NAME
--------------------
Adams
August
Brooks
Ferris
Glenn
Green
Johnson
Laikin
j. Find the company that has the most employees. Show the company name and number of employees.
COMPANY_NAME COUNT(DISTINCT employee_name)
------------------------------ -----------------------------
First Bank Corporation 5
k. Find the company that has the smallest payroll.
COMPANY_NAME
------------------------------
Cathedral Software
l. Find those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation.
COMPA.
Discover the innovative and creative projects that highlight my journey throu...dylandmeas
Discover the innovative and creative projects that highlight my journey through Full Sail University. Below, you’ll find a collection of my work showcasing my skills and expertise in digital marketing, event planning, and media production.
Implicitly or explicitly all competing businesses employ a strategy to select a mix
of marketing resources. Formulating such competitive strategies fundamentally
involves recognizing relationships between elements of the marketing mix (e.g.,
price and product quality), as well as assessing competitive and market conditions
(i.e., industry structure in the language of economics).
Personal Brand Statement:
As an Army veteran dedicated to lifelong learning, I bring a disciplined, strategic mindset to my pursuits. I am constantly expanding my knowledge to innovate and lead effectively. My journey is driven by a commitment to excellence, and to make a meaningful impact in the world.
Recruiting in the Digital Age: A Social Media MasterclassLuanWise
In this masterclass, presented at the Global HR Summit on 5th June 2024, Luan Wise explored the essential features of social media platforms that support talent acquisition, including LinkedIn, Facebook, Instagram, X (formerly Twitter) and TikTok.
Digital Transformation and IT Strategy Toolkit and TemplatesAurelien Domont, MBA
This Digital Transformation and IT Strategy Toolkit was created by ex-McKinsey, Deloitte and BCG Management Consultants, after more than 5,000 hours of work. It is considered the world's best & most comprehensive Digital Transformation and IT Strategy Toolkit. It includes all the Frameworks, Best Practices & Templates required to successfully undertake the Digital Transformation of your organization and define a robust IT Strategy.
Editable Toolkit to help you reuse our content: 700 Powerpoint slides | 35 Excel sheets | 84 minutes of Video training
This PowerPoint presentation is only a small preview of our Toolkits. For more details, visit www.domontconsulting.com
Affordable Stationery Printing Services in Jaipur | Navpack n PrintNavpack & Print
Looking for professional printing services in Jaipur? Navpack n Print offers high-quality and affordable stationery printing for all your business needs. Stand out with custom stationery designs and fast turnaround times. Contact us today for a quote!
VAT Registration Outlined In UAE: Benefits and Requirementsuae taxgpt
Vat Registration is a legal obligation for businesses meeting the threshold requirement, helping companies avoid fines and ramifications. Contact now!
https://viralsocialtrends.com/vat-registration-outlined-in-uae/
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...BBPMedia1
Grote partijen zijn al een tijdje onderweg met retail media. Ondertussen worden in dit domein ook de kansen zichtbaar voor andere spelers in de markt. Maar met die kansen ontstaan ook vragen: Zelf retail media worden of erop adverteren? In welke fase van de funnel past het en hoe integreer je het in een mediaplan? Wat is nu precies het verschil met marketplaces en Programmatic ads? In dit half uur beslechten we de dilemma's en krijg je antwoorden op wanneer het voor jou tijd is om de volgende stap te zetten.
"𝑩𝑬𝑮𝑼𝑵 𝑾𝑰𝑻𝑯 𝑻𝑱 𝑰𝑺 𝑯𝑨𝑳𝑭 𝑫𝑶𝑵𝑬"
𝐓𝐉 𝐂𝐨𝐦𝐬 (𝐓𝐉 𝐂𝐨𝐦𝐦𝐮𝐧𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬) is a professional event agency that includes experts in the event-organizing market in Vietnam, Korea, and ASEAN countries. We provide unlimited types of events from Music concerts, Fan meetings, and Culture festivals to Corporate events, Internal company events, Golf tournaments, MICE events, and Exhibitions.
𝐓𝐉 𝐂𝐨𝐦𝐬 provides unlimited package services including such as Event organizing, Event planning, Event production, Manpower, PR marketing, Design 2D/3D, VIP protocols, Interpreter agency, etc.
Sports events - Golf competitions/billiards competitions/company sports events: dynamic and challenging
⭐ 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐝 𝐩𝐫𝐨𝐣𝐞𝐜𝐭𝐬:
➢ 2024 BAEKHYUN [Lonsdaleite] IN HO CHI MINH
➢ SUPER JUNIOR-L.S.S. THE SHOW : Th3ee Guys in HO CHI MINH
➢FreenBecky 1st Fan Meeting in Vietnam
➢CHILDREN ART EXHIBITION 2024: BEYOND BARRIERS
➢ WOW K-Music Festival 2023
➢ Winner [CROSS] Tour in HCM
➢ Super Show 9 in HCM with Super Junior
➢ HCMC - Gyeongsangbuk-do Culture and Tourism Festival
➢ Korean Vietnam Partnership - Fair with LG
➢ Korean President visits Samsung Electronics R&D Center
➢ Vietnam Food Expo with Lotte Wellfood
"𝐄𝐯𝐞𝐫𝐲 𝐞𝐯𝐞𝐧𝐭 𝐢𝐬 𝐚 𝐬𝐭𝐨𝐫𝐲, 𝐚 𝐬𝐩𝐞𝐜𝐢𝐚𝐥 𝐣𝐨𝐮𝐫𝐧𝐞𝐲. 𝐖𝐞 𝐚𝐥𝐰𝐚𝐲𝐬 𝐛𝐞𝐥𝐢𝐞𝐯𝐞 𝐭𝐡𝐚𝐭 𝐬𝐡𝐨𝐫𝐭𝐥𝐲 𝐲𝐨𝐮 𝐰𝐢𝐥𝐥 𝐛𝐞 𝐚 𝐩𝐚𝐫𝐭 𝐨𝐟 𝐨𝐮𝐫 𝐬𝐭𝐨𝐫𝐢𝐞𝐬."
Putting the SPARK into Virtual Training.pptxCynthia Clay
This 60-minute webinar, sponsored by Adobe, was delivered for the Training Mag Network. It explored the five elements of SPARK: Storytelling, Purpose, Action, Relationships, and Kudos. Knowing how to tell a well-structured story is key to building long-term memory. Stating a clear purpose that doesn't take away from the discovery learning process is critical. Ensuring that people move from theory to practical application is imperative. Creating strong social learning is the key to commitment and engagement. Validating and affirming participants' comments is the way to create a positive learning environment.