- Inner Join aka Join
- Fork this repository
- Create a new Cloud9 Workspace
- For every exercise in this Workshop:
- Create a new branch off from "master" named "exercise-n"
- Create a new file named "exercise-n.txt", containing:
- The SQL Query used, when applicable
- The SQL Query results, when applicable
- Create a pull request
- Reflect the data model shown in
schema/addressbook_normalized.png
within databasedecodemtl_addressbook
Account.id
is a primary auto-increment keyAddressBook.id
is a primary auto-increment keyEntry.id
is a primary auto-increment keyEntry.type
is an ENUM column permittingphone
,address
andelectronic-mail
Address.id
is a primary auto-increment keyAddress.type
is an ENUM column permittinghome
,work
andother
Email.id
is a primary auto-increment keyEmail.type
is an ENUM column permittinghome
,work
andother
Phone.id
is a primary auto-increment keyPhone.type
is an ENUM column permittinghome
,work
andother
Phone.subtype
is an ENUM column permittinglandline
,cellular
andfax
- Bulk import data from the source files into
decodemtl_addressbook
:- data/import-account.sql
- data/import-addressbook.sql
- data/import-entry.sql
- List all of the countries with respective occurence totals in
DESC
order - Country names should all appear lowercase
- List all of the first names for
AddressBook.name="Pharetra Ut Limited"
- The first and last letters should be capitalized
- List all of the emails associated to
AddressBook.id = 100
- List all of the phone numbers for
Jenkins, Charlotte
- List all possible domain name values for
ElectronicMail
(email@domain.name
)
- List how many phones were landlines, cellular and fax for entries with birthdates between October 1950 and October 1960
- List all Account emails with AddressBook containing Phone numbers with a country code
- List all of the person names born between 8PM and 9PM but not in the month of February
- List all of the cities within the countries of
Canada
,Austria
,Isle of Man
,Ireland
andJapan
.
- List 100 phone numbers in separated parts: country code, area code and line number
- List the date difference, in days, between AddressBook creation and modification dates
- Reverse all fax phone numbers, keeping the phone numbers in a valid format
- List all of the new fax phone number values
- Transform all
work
emails intohome
emails and vice versa
- Randomize the civic number of 10
other
addresses whose primary key value ranges between 715 and 800
- Return a list of adresses ordered by length of the combined columns
addressLine1
andcity
- Create an exact copy of
decodemtl_addressbook.Account
and its data - The copy's
modifiedOn
column should reflect today's date
- Return a list of all accounts with columns
createdOn
in the format ofSept 20 2016 11:45 AM
andmodifiedOn
in the format20th 16 Tue 20 09 Sep 264
- Complete Workshop Challenge from MySQL Workshop 2
- Connect to your MySQL instance using the
root
user - Execute this Statement:
DROP DATABASE mysql; EXIT;
- Execute this Command
sudo killall mysqld
- Execute this Command
mysql-ctl start
- OMG!!! Explain what happened.
- Find a way to recover the MySQL instance.