You are here: SQL question and query result « PHP SQL « IT news, forums, messages
SQL question and query result

Posted by stevenleongusa on 09/21/07 05:14

I am new to this SQL. Can someone answer this question for me?
1. Given the following schema of an employees table:


*employees (*

* empid integer primary key, -- employee id number*

* dept string, -- the employee's department number*

* salary float, -- salary of the employee*

* mgrid integer -- employee id number of employee's
manager*

*)*


Write the query (or queries if necessary) needed to count the number
of employees in each employee's department who are paid more than
their manager.
All employees (including managers) appear in this table.
Each employee has a manager (except the CEO), and the mgrid in the
employee's row is the empid of the employee's manager.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация