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
How do I produce R output to show rainfall vs temperature Site Rain Temp Altitude Tadpoles...
How do I produce R output to show rainfall vs temperature Site Rain Temp Altitude Tadpoles Breeding 1 769.77 22.37 Low 97 61 2 664.85 19.46 Low 86 70 3 807.13 23.17 Low 104 61 4 620.05 17.85 Low 117 113 5 673.21 20.29 Low 98 92 6 734.18 20.58 Low 88 100 7 526.62 16.29 Low 95 102 8 647.86 18.51 Low 38 66 9 672.3 20.13 Low 64 64 10 666.67 18.91 Low 57 18 11 698.8 20.73...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...