Question

10. How many t+u+t+o+r+s have a status of Temp Stop? Which t+u+t+o+r+s are active? T+U+T+O+R T+u+t+o+rID...

10. How many t+u+t+o+r+s have a status of Temp Stop? Which t+u+t+o+r+s are active?

T+U+T+O+R
T+u+t+o+rID CertDate Status
100 1/5/08 Active
101 1/5/08 Temp Stop
102 1/5/08 Dropped
103 5/22/08 Active
104 5/22/08 Active
105 5/22/08 Temp Stop
106 5/22/08 Active
STUDENT
StudentID Read
3000 2.3
3001 5.6
3002 1.3
3003 3.3
3004 2.7
3005 4.8
3006 7.8
3007 1.5
MATCH_HISTORY
MatchID StudentID StartDate EndDate
1 100 3000 1/10/08
2 101 3001 1/15/08 5/15/08
3 102 3002 2/10/08 3/1/08
4 106 3003 5/28/08
5 103 3004 6/1/08 6/15/08
6 104 3005 6/1/08 6/28/08
7 104 3006 6/1/08

Note: please I want in sql code in sql server management studio and please tell me data types of T+u+t+o+rID,CertDate,Status,StudentID,Read, MatchID,StartDate and EndDate and if possible please upload the snapshot of answer as well.

Note:This database management class

Homework Answers

Answer #1

Data types

T+u+t+o+rID - int

CertDate - Date

Status - varchar(15)

StudentID - int

Read - Decimal(4,2)

MatchID - int

StartDate - Date

EndDate - Date

How many t+u+t+o+r+s have a status of Temp Stop? [ Since +symbol is not supported in sql, I have used _(underscore) ]

SQL QUERY

select count(*) from t_u_t_o_r where status="Temp Stop"
group by status;

Output Screen

Which t+u+t+o+r+s are active?

SQL QUERY

select t_u_t_o_rID from t_u_t_o_r where status="Active";

Output Screen

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT