Answered step by step
Verified Expert Solution
Link Copied!

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 Job_Post I am going to provide. Please answer me correctly, I will give you a thumbs up.
The Job_Post code:
drop table seach_job_post cascade constraints;
create table search_job_posts (
jobid number primary key,
cname varchar2(100),
jtitle varchar2(100),
jdescribe varchar2(500),
min_pay number,
max_pay number,
j_city2 varchar2(50),
j_states2 varchar2(50),
job_type varchar2(20),
j_status varchar2(20),
Primary key (Jobid),
Foreign key (accid) REFERENCES account_t(accid),
Foreign key (compID) REFERENCES company(compID)
);
insert into search_jobposts VALUES (1, 'ABC Company', 'Software Engineer', 'Seeking experienced software engineer', 60000,80000, 'Example City', 'CA', 'full time', 'active');
insert into search_jobposts VALUES (2,'XYZ Corporation', 'Data Analyst', 'Looking for a skilled data analyst', 50000,70000, 'Another City', 'NY', 'part time', 'active');
insert into search_jobposts VALUES (3,'123 Inc.', 'Marketing Specialist', 'Join our marketing team', 45000,60000, 'Cityville', 'CA', 'full time', 'inactive');
I need something similar for my feature as well:
MY feature which need to be answered:
Feature 7: Generate job alerts. The input is a job post ID and a timestamp. The procedure does the following:
1) 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.
2) 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 1 for associate degree, 2 for bachelor, 3 for master's and 4 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.
3) for each job seeker found in step 2), 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

What is spinal Multiple Sclerosis?

Answered: 1 week ago

Question

How is a generic type instantiated (to form a parameterized type)?

Answered: 1 week ago