MoL Chapter 2 Lab
From SQLZoo
From chapter 2 Lab
Show the name of the element with symbol 'N'
SELECT name
FROM element
WHERE sym='N'
SELECT name
FROM element
WHERE sym='N'
Show the symbol for the element ‘Selenium’
SELECT sym
FROM element
WHERE name='Selenium'
Show the atomic number of 'Oxygen'
SELECT num
FROM element
WHERE name='Oxygen'
Show the element with atomic number 23
SELECT name
FROM element
WHERE num=23
List the elements where the atomic number is less than 5.
SELECT name
FROM element
WHERE num<5
4. 5. 6. 7. List the elements where the name comes before ‘Boron’ alphabetically. 8. Clorine (symbol Cl) has symbol length 2. Hydrogen (symbol H) has symbol length 1. List all the name and symbol of all elements with symbol length 1. You can use the function length(sym) to get the length of the symbol 9. Show the elements with names longer than 10 characters. 10. List the elements where the group is larger than the atomic number.