SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL query help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

johncarter
Starting Member

United Kingdom
2 Posts

Posted - 10/11/2012 :  03:31:24  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

2161 Posts

Posted - 10/11/2012 :  06:56:24  Show Profile  Reply with Quote
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

United Kingdom
2 Posts

Posted - 10/11/2012 :  07:34:42  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

2161 Posts

Posted - 10/12/2012 :  06:43:24  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000