MySQL Exercise 1: Top 10 SELECT SQL Statements Examples with video explained

Excercise 1: 10 SELECT SQL Statements Examples with video explained in Khmer

This is the basic SQL SELECT Statements for you to practise to get database on a certain condition asked. I have prepare 10 questions examples for you with answers. I hope this will have you to learn more how to work with SQL Statements.

លំហាត់ MySQL SQL SELECT Exercise: #1 | #2 | #3

First of all I want you to read each question then try to write the query. After that check the answer provided below each questions.

Learn More Introduction to Database (SQL) in Khmer with videos: Chapter 1 | Chapter 2 | Chapter 3

Here is the ER Diagram (Table Relationship):

The question in video is in Khmer, may help you more.
Write SQL statement to answer the question below:
#1 Show all information about authors
SELECT * FROM authors;
#2 Show all types of books
SELECT * FROM types;
#3. Show all books information that have page greather than 200 pages.
SELECT * FROM books where pageCount > 200
#4 Show all book information that pages between 100 and 200 pages.
SELECT * FROM books where pageCount BETWEEN 100 AND 200;
SELECT * FROM books WHERE pagecount >=100 AND pagecount <= 200; 
#5 Show all class students take (show once if class is the same)
SELECT DISTINCT class FROM students;
EP08 សំនួរចម្លើយប្រើ SQL SELECT Statement ផ្នែតទី១
This video explain all the table and answer to question 1 to 5.
#6 Show all name of the authors.
SELECT name FROM authors;
#7 Show all books name which written by author name "Jack" (two table - INNER JOIN)
SELECT B.name, A.name
FROM authors A INNER JOIN books B ON A.authorID = B.authorID 
WHERE A.name='jack';
#8.Show name, gender, data of birth and class of all students.
SELECT name, gender, birthDate, class FROM students;
#9. Show all female student information with name, date of birth, and class
SELECT name, birthDate, class FROM students where gender='f';
#10. Show all female student information that have point greater or equal to 800
SELECT * FROM students WHERE gender='F' AND point >=800;

Free Khmer Ebook Download (PDF): Database | Microsoft Access | Python Programming

EP09 សំនួរចម្លើយប្រើ SQL SELECT Statement ផ្នែតទី២
This video explain from question 6 to 10.
Download Library Data and How to Use Data Here
Previous Post Next Post