SQLite Queries

0.0(0)
Studied by 7 people
0%Unit Mastery
0%Exam Mastery
Build your Mastery score
multiple choiceMultiple Choice
call kaiCall Kai
Supplemental Materials
Card Sorting

1/18

Last updated 12:50 PM on 11/22/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

The Table name is Albums and the column name is Title. Write a query that shows the names of all albums.

SELECT Title

FROM Albums;

2
New cards

The Table name is Albums and the column name is Title. Write a query that shows the names of all Albums in Ascending Alphabetical Order.

SELECT Title

FROM Albums

ORDER BY Title ASC;

3
New cards

Write a query that shows all Albums by the artist with ArtistId = 58, assuming you have an Albums table that contains the columns Title

SELECT Title

FROM Albums

WHERE ArtistId = 58;

4
New cards

Write a query that shows all Customers who live in Canada from the Country column in the Customers table.

SELECT *

FROM Customers

WHERE Country = 'Canada';

5
New cards

Write a query that shows all Customers who live in Canada from the Country column in the Customers table. Order By LastName and Lascending Alphabetical Order

SELECT *

FROM Customers

WHERE Country = 'Canada'

ORDER BY LastName ASC;

6
New cards

Write a query that shows the FristName and LastName of all Customers who come from the Company "Microsoft Corporation", assuming the Customers table has the Column Company

SELECT FirstName, LastName

FROM Customers

WHERE Company = 'Microsoft Corporation';

7
New cards

Write a query that shows the FirstName and LastName of all Customers who do not have a Company (where the Company field is NULL)

SELECT FirstName, LastName

FROM Customers

WHERE Company IS NULL;

8
New cards

Write a query that shows the FirstName and LastName from the table Customers who live in either Sweden or Spain

SELECT FirstName, LastName

FROM Customers

WHERE Country IN ('Sweden', 'Spain');

9
New cards

Write a query that shows all the Customers from the USA that dont have Fax (where the Fax field is NULL)

SELECT *

FROM Customers

WHERE Country = 'USA' AND Fax IS NULL;

10
New cards

Write a query that shows all the Customers from the Country USA that have Fax (where the Fax field is not NULL)

SELECT *

FROM Customers

WHERE Country = 'USA' AND Fax IS NOT NULL;

11
New cards

Write a query that shows all the Customers from the Country USA in the City California that have Fax (where the Fax field is not NULL)

SELECT * FROM Customers

WHERE Country = 'USA' AND City = 'California' AND Fax IS NOT NULL;

12
New cards

Write a query that shows all the Email addresses from the Customers Table that end with "com"

SELECT Email

FROM Customers

WHERE Email LIKE '%.com';

13
New cards

Write a query that shows all the Email addresses from the Customers table that start with jack or stan

SELECT Email

FROM Customers

WHERE Email LIKE 'jack%' OR Email LIKE 'stan%';

14
New cards

Write a query that shows all the Email addresses from the Customers table that contain the word murray

SELECT Email

FROM Customers

WHERE Email LIKE '%murray%';

15
New cards

Write a query that shows the FirstName and LastName from the Customers table who have a PostalCode that starts with 6, 7, 8, or 9. Use LIKE

SELECT FirstName, LastName

FROM Customers

WHERE PostalCode LIKE '6%'

OR PostalCode LIKE '7%'

OR PostalCode LIKE '8%'

OR PostalCode LIKE '9%';

16
New cards

Write a query that shows the FirstName, LastName, City and PostalCode from the table Customers that live in Copenhagen

SELECT FirstName, LastName, City , PostalCode

FROM Customers

WHERE City = 'Copenhagen';

17
New cards

Write a query that shows the FirstName, LastName, City and PostalCode from the table Customers that live in Copenhagen and Paris

SELECT FirstName, LastName, City, PostalCode

FROM Customers

WHERE City = 'Copenhagen'

OR City = 'Paris';

18
New cards

The Table name is Tracks and the column name is Name. Write a query that shows all Tracks, Name that dose not have a UnitPrice of 0.99

SELECT Name

FROM Tracks

WHERE UnitPrice != 0.99;

19
New cards

The Table name is Tracks and the column name is Name. Write a query that shows all Tracks whose Name start with the word Go.

SELECT Name

FROM Tracks

WHERE Name LIKE 'Go%'

Explore top flashcards

flashcards
EXPH0300
108
Updated 1038d ago
0.0(0)
flashcards
Week 1
28
Updated 1088d ago
0.0(0)
flashcards
Chemistryy
34
Updated 1193d ago
0.0(0)
flashcards
Unit Six — Let's eat!
41
Updated 940d ago
0.0(0)
flashcards
Pysch exam 1
57
Updated 915d ago
0.0(0)
flashcards
EXPH0300
108
Updated 1038d ago
0.0(0)
flashcards
Week 1
28
Updated 1088d ago
0.0(0)
flashcards
Chemistryy
34
Updated 1193d ago
0.0(0)
flashcards
Unit Six — Let's eat!
41
Updated 940d ago
0.0(0)
flashcards
Pysch exam 1
57
Updated 915d ago
0.0(0)