Practice Center – combine where

Exercise 1

Show the first name and state of clients (table clients) which are from the state (column state) Kerala and which first name (column first_name) is aamir.


Exercise 2

Show the first name and state of clients (table clients) which are from the state (column state) Karnataka or which first name (column first_name) is aamir.


Exercise 3

Show the state and client ID (column client_id) of clients fulfilling one of the following conditions:

  • client_id is strictly smaller than 5 and state is Kerala.
  • client_id is strictly greater than 10 and state is Karnataka.



Exercise 4

Show the first name (column first_name), last name (column last_name), state and client ID (column client_id) of clients fulfilling both the following conditions:

  • first_name starts with “aa” or last name is “gupta”
  • client_id is strictly greater than 10 or state is Karnataka.



 
Share on:


Author:
Last udpated: March 2, 2016
Created: March 2, 2016