wiki.javier.io

This is an old revision of the document!


  • Display the first and last name of all customers
SELECT FirstName, LastName FROM Customer
  • Display the first and last name of all customers who are NOT from Paris
SELECT FirstName, LastName FROM Customer WHERE City <> 'Paris'
  • Get the customer id and spend amount of all customers who have either spend less than $10 or more than $100
SELECT CustomerId, InvoiceTotal FROM Customer WHERE InvoiceTotal < 10 OR InvoiceTotal > 100
  • Get the first, last name and city of customers who live in Brasil or are called 'Frank Sinatra'
SELECT FirstName, LastName, City FROM Customer WHERE Country = 'Brasil' OR (FirstName = 'Frank' AND LastName = 'Sinatra')