SQL Assignment 1

Due: August 28, 2009

All queries must be well documented and all columns must have reasonable titles.

  1. Find the current date and time
  2. Find the square root of two
  3. Find the name of all customers living in Texas
  4. Find all of the information of customer with customer Id 538.
  5. Find the userid and name for customers with the last name Smith
  6. Find the userid and dates of customers buying more than 900 shares in one purchase
  7. Find the stock orders where the customer sold more than 600 shares and the price is over 100, or the customer bought more than 600 shares and the price is under 30.
  8. Find all of the stock order information with a price between $50 and $51
  9. Find the names of all customers without a state
  10. Find all of the stock price dates where the difference between the high and the low is more than 9