Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL query help

Author  Topic 

johncarter
Starting Member

2 Posts

Posted - 2012-10-11 : 03:31:24
I need some help with some sql questions kinda lost and not to sure how to answer them. thanks in advance if anyone helps out

For each event plan, list the planno, workDate and number planlines it has (numPlanLine). Only include plans with 'Operation' activity. Display result in the order of plan number.

List event no for the plans whose resource is either 'R101' or 'R104'. Display result in the order of event no.

For each event, list the number of plans whose activity is Operation ("Event Plans") . Display the result in the order of event number.

Give plan number, event nunmber and activity for the plan with which no employee is associated (i.e. is missing) and work date falls in December 2002 (you can model it as a period).Show result in the order of plan number.

List the information (employee number, name and department) of event plan supervisors. Also list the event number, plan number and activity. Display the result in order of event number and plan number.

List employ number, name, increased salary of employees who are in the Planning department after a raise of 11% is given to them ( show the salary as a whole number). Display the result in the order of employee name.

EventRequest
EventNo
DateHeld
DateReq
FacNo
CustNo
DateAuth
Status
EstCost
EstAudience

EventPlan
PlanNo
WorkDate
Notes
Activity

Employee
EmpNo
EmpName
Dept
Email
Phone
Salary

EventPlanLine
LineNo
Number
TimeTaken
LocNo
ResNo

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-10-11 : 06:56:24
Is this homework? What have you tried so far?








How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page

johncarter
Starting Member

2 Posts

Posted - 2012-10-11 : 07:34:42
they're practice questions but from simple sql to this the learning curve is large and ive seen questions with answers similar to these but i cant figure these out the final question i got the answer but i neede it as a whole number and i couldnt figure out how to force a whole number, the rest ive just got no idea how to join and what not i understand the concept of joining having the primary and foreign key sometimes its hard to understand what should and shouldnt be and how to write the links between the two tables in the oracle sql.
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-10-12 : 06:43:24
Here are some links that might help a bit more:

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp

They explain the basic concepts of SQL in an easy to understand way.








How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page
   

- Advertisement -