3 Replies - 9475 Views - Last Post: 28 January 2009 - 02:46 PM Rate Topic: -----

#1 objkenobi   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-January 09

write SQL queries using Between, Like, and Union

Post icon  Posted 26 January 2009 - 07:13 PM

Using the database and tables from Week Two, write SQL statements and enter the records into the employee table for the workers identified in the Employee Files for the administrative offices and the Del Mar location. Check the results by selecting all of the columns from both of your tables

Using the database and tables in Week Two, write SQL queries using Between, Like and Union:
a. Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use salary to restrict the data.)
b. Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use hire dates to restrict the data.)
c. Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. (Use telephone area codes to restrict data.)
d. Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. (Use age to restrict data.)
e. Write a SQL query that uses UNION of the two tables to produce a third table.

Using the updated database, write the following queries using the SQL GROUP BY or ORDER BY statement:
a. Group employees by job classification: Select the employees’ last names and group them by EEO-1 Classification.
b. Group employees by salary: Select the employees’ last names and group them by salary.
c. Group employees by salary within their job classification: Select the employees’ last names and group them by salary within their EEO-1 Classification.
d. Select the employees’ last names and group them by salary within job titles that are grouped into exempt and non-exempt.

Is This A Good Question/Topic? 0
  • +

Replies To: write SQL queries using Between, Like, and Union

#2 capty99   User is offline

  • i am colt mccoy
  • member icon

Reputation: 99
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: write SQL queries using Between, Like, and Union

Posted 26 January 2009 - 07:18 PM

k
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: write SQL queries using Between, Like, and Union

Posted 26 January 2009 - 07:39 PM

[rules][/rules]
Was This Post Helpful? 1
  • +
  • -

#4 eclipsed4utoo   User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1535
  • View blog
  • Posts: 5,972
  • Joined: 21-March 08

Re: write SQL queries using Between, Like, and Union

Posted 28 January 2009 - 02:46 PM

sorry, we do not do homework for you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1