Sql
General 1 question
- #1Comparisons vs. Functions
- Improve the following query
SELECT COUNT(purchased_at) FROM shawarma_purchases WHERE purchased_at BETWEEN '2017-01-01' AND '2017-12-31';
SQL Self Assessment 11 questions
- #2What is SQL?
- #3How is SQL Different from NoSQL
- #4When is it best to use SQL? NoSQL?
- #5How would I select all fields from this table?
- #6How many items are in John's cart?
- #7What is the sum of all the cash spent across all customers?
- #8How many people have items in their cart?
- #9How would you join the customer table to the order table?
- #10How would you show which customer ordered which items?
- #11Using a with statement, how would you show who ordered cat food, and the total amount of money spent?
- #12Which of the following queries would you use?
SELECT count(*) SELECT count(*) FROM shawarma_purchases FROM shawarma_purchases WHERE vs. WHERE YEAR(purchased_at) == '2017' purchased_at >= '2017-01-01' AND purchased_at <= '2017-31-12'