Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write me a simple sql code based on the Job _ Post I am going to provide. Please answer me correctly, I will give you
Write me a simple sql code based on the JobPost I am going to provide. Please answer me correctly, I will give you a thumbs up
The JobPost code:
drop table seachjobpost cascade constraints;
create table searchjobposts
jobid number primary key,
cname varchar
jtitle varchar
jdescribe varchar
minpay number,
maxpay number,
jcity varchar
jstates varchar
jobtype varchar
jstatus varchar
Primary key Jobid
Foreign key accid REFERENCES accounttaccid
Foreign key compID REFERENCES companycompID
;
insert into searchjobposts VALUES 'ABC Company', 'Software Engineer', 'Seeking experienced software engineer', 'Example City', CA 'full time', 'active';
insert into searchjobposts VALUES XYZ Corporation', 'Data Analyst', 'Looking for a skilled data analyst', 'Another City', NY 'part time', 'active';
insert into searchjobposts VALUES Inc. 'Marketing Specialist', 'Join our marketing team', 'Cityville', CA 'full time', 'inactive';
I need something similar for my feature as well:
MY feature which need to be answered:
Feature : Generate job alerts. The input is a job post ID and a timestamp. The procedure does the following:
it first checks whether there is a job post with the input ID and is still active. If there is no such a job post, print a message 'Invalid job post ID and stop.
it then finds all job seekers who satisfy ALL of the following conditions:
a the job seeker's highest degree meets the minimal degree requirement of the job post if you use for associate degree, for bachelor, for master's and for doctoral degree, then the highest degree minimal degree of the job post;
b the job seeker's number of years of work experience is greater or equal to the minimal experience of the job post;
c for each skill required by the job post, the job seeker has that skill and the skill level is greater or equal to required level.
for each job seeker found in step print out the name of the job seeker and insert a row into the message table with a newly generated message ID account ID as the job seeker's account ID message time as the input time, and body of the message is 'A job post X is available and you are qualified to apply' where X is the input job post ID
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started