Skip to content

implemented RecruitingEducatorsCompany scenario#36

Open
RuchyBrach wants to merge 1 commit into
CPU-Code-School:mainfrom
RuchyBrach:main
Open

implemented RecruitingEducatorsCompany scenario#36
RuchyBrach wants to merge 1 commit into
CPU-Code-School:mainfrom
RuchyBrach:main

Conversation

@RuchyBrach
Copy link
Copy Markdown

I chose the Recruiting Educators Company.

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! 100% See comments, no need to resubmit,

Comment thread 1table.sql
constraint ck_Recruiting_firstname_cannot_be_blank check(Firstname <> ''),
LastName varchar(30) not null
constraint ck_Recruiting_lastname_cannot_be_blank check(lastname <> ''),
DOB date not null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for constraint on DOB. You are restricting it to be before DateContacted.

Comment thread 1table.sql
DOB date not null
constraint ck_Recruiting_dob_cannot_be_more_than_current_date check(DOB < getdate()),
Gender varchar(6)
constraint ck_Recruiting_gender_must_be_either_male_or_female check(Gender in('male', 'female')),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use m or f.

Comment thread 1table.sql
Media varchar(20) not null
Constraint ck_Recruiters_media_cannot_be_blank check(Media <> ''),
DateContacted date not null
constraint ck_Recruiters_datecontacted_must_be_after_or_on_february_17_2017 check(DateContacted >= '02-17-2017'),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure it's not in future.

Comment thread 1table.sql
SchoolPlaced varchar(40) null
constraint ck_Recruiters_school_placed_cannot_be_blank check (SchoolPlaced <> ''),
DateFoundJob date null
constraint ck_Recruiters_Date_Found_job_cannot_be_blank check (DateFoundJob <> ''),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this constraint. A blank date returns a valid date. Maybe change it to not in future constraint.

Comment thread reports.sql

select amountofstudents = count(*), r.CollegeAttended
from RecruitingEducatorsCompany r
where datediff(day, r.Datefoundjob, r.Datecontacted) < 14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip: You can use datediff(week...).

Comment thread reports.sql

--5. How many educators get placed a day per type of education degree?

select day = day(r.datefoundjob), placedperday = count(day(r.DateFoundJob)), r.TitleOfDegree
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to show the day. This can be done same as previous results, just split it up per degree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant