• 1. 
    Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.

  • SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)
  • SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)
  • SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)
  • SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);
  • 2. 
    Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.

  • SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70
  • SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70
  • SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
  • SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70
  • 3. 
    What does the ALTER TABLE clause do?

  • The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints
  • The SQL ALTER TABLE clause is used to insert data into database table
  • THE SQL ALTER TABLE deletes data from database table
  • The SQL ALTER TABLE clause is used to delete a database table
  • 4. 
    SQL query to find the temperature in increasing order of all cities.

  • SELECT city FROM weather ORDER BY temperature
  • SELECT city, temperature FROM weather
  • SELECT city, temperature FROM weather ORDER BY temperature
  • SELECT city, temperature FROM weather ORDER BY city
  • 5. 
    Which SQL function is used to count the number of rows in a SQL query?

  • COUNT()
  • NUMBER()
  • SUM()
  • COUNT(*)
  • 6. 
    The UPDATE SQL clause can _____________

  • update only one row at a time
  • update more than one row at a time
  • delete more than one row at a time
  • delete only one row at a time
  • 7. 
    Which aggregate function would I want to use to see which actor in my table is the oldest?

  • SUM
  • MAX
  • GROUP BY
  • WHERE
  • 8. 
    What do the letters in CRUD stand for?

  • Create Read Update Delete
  • Craft Run Upload Database
  • Create Run Unrun Data
  • Crunch Read Uptime Downtime
  • 9. 
    I want to select all columns in my "actors" table for all actors older than 30. How can I do that?

  • SELECT * FROM actors;
  • SELECT age FROM actors;
  • SELECT * FROM actors WHERE age > 30;
  • SELECT name, age FROM actors WHERE age < 30;
  • 10. 
    I want to add the actor "Brad Pitt" (aged 56) to my table "actors." Which statement will do this?

  • INSERT INTO actors VALUES ("Brad Pitt", 56);
  • INSERT "Brad Pitt" AND 56 INTO actors;
  • UPDATE age = 56 WHERE name = "Brad Pitt";
  • CREATE ENTRY ("Brad Pitt", 56) IN TABLE actors;
  • 11. 
    I want to select EVERY column and entry in my "actors" table. How can I do that?

  • SELECT * FROM actors;
  • SELECT age FROM actors;
  • SELECT * FROM actors WHERE age > 30;
  • SELECT name, age FROM actors WHERE age < 30;
  • 12. 
    What's one solid reason for us to use databases instead of just storing stuff in a variable on the server?

  • If the server goes down, we won't lose all our data--our data will persist between sessions
  • A database is a more compact way of storing the information
  • Accessing information from a database is faster than accessing information from a variable
  • It's a toss-up, really--they're both good ways of storing information
  • 13. 
    I want to create a table in my table named "actors" with two columns: "name" and "age." What statement will do this?

  • CREATE TABLE actors (name TEXT, age INTEGER);
  • CREATE actors WITH COLUMNS (name, age);
  • CREATE DATABASE actors WITH COLUMNS (name TEXT, age INTEGER);
  • CREATE actors (name, age): TABLE, TEXT, INTEGER;
Report Question
warning
access_time
  Time