Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the SQL code to determine which customers have placed more than 6 orders for any kind of product type 'flooring' in the past 3

Write the SQL code to determine which customers have placed more than 6 orders for any kind of product type 'flooring' in the past 3 years who have also had a job type 'Foundation Re-Build' in the past 2 years with employee Jordan Bailey having participated.

image text in transcribed

CUSTOMER_TYPE PK CustTypeID LEVEL PK LevelID SKILL SkilllDh auPK PK SKILL_TYPE SkillTypeID PK CustTypeName CustTypeDescr LevelName LevelDescr EMPLOYEE SKILL HOA" POH- PK Emp SkilllD FK1 SkillTypeID SkillName SkillDescr SkillTypeName SkillTypeDescr FK1 EmplD FK2 SkillID FK3 LevellD EMPLOYEE PK Emplo CUSTOMER CustID JOB_TYPE Job TypeID EMPLOYEE_POSITION PK,FK1 EmplD PK,FK2 PositionID PK PK HD EmpFname EmpLname EmpBirth Date FK1 Job TypeName Job TypeDescr BeginDate EndDate CustTypeID CustFname CustLname CustAddress CustCity Cust State CustZip POH CUST_JOB_TASK PK JobTaskID JOB JobID TASK TaskID POSITION PositionID PK PK Posit PK FK1 FK2 -- - ORDER FK3 TaskName TaskDecsr PK FK4 FK5 Position Name Position Descr OrderID TaskID EquipID ToolID EmpSkillID JobID BeginTime EndTime JobName JobBeginDate JobEndDate FK1 Job TypelD FK2 CustID Job Descr FK1 JobID Order Date EQUIPMENT LINE ITEM PK LineItemID TOOL_TYPE ToolTypeID TOOL ToollD EQUIPMENT_TYPE PK EquipTypeID PK PK PK EquipID HOA --H FK1 FK1 OrderID FK2 ProductID Qty ToolTypeName ToolTypeDescr ToolName ToolTypeID ToolDescr Equip TypeName Equip TypeDescr FK1 Equip TypeID EquipName Equip Decsr PRODUCT ProductID PRODUCT_TYPE Product TypeID TOOL_CONDITION PK ToolConditionID CONDITION ConditionID PK PK PK DO--------- Condition Name ConditionDescr ProductName Price FK1 Product TypeID ProductTypeName Product TypeDescr FK1 Toolid FK2 ConditionID Begin Date CUSTOMER_TYPE PK CustTypeID LEVEL PK LevelID SKILL SkilllDh auPK PK SKILL_TYPE SkillTypeID PK CustTypeName CustTypeDescr LevelName LevelDescr EMPLOYEE SKILL HOA" POH- PK Emp SkilllD FK1 SkillTypeID SkillName SkillDescr SkillTypeName SkillTypeDescr FK1 EmplD FK2 SkillID FK3 LevellD EMPLOYEE PK Emplo CUSTOMER CustID JOB_TYPE Job TypeID EMPLOYEE_POSITION PK,FK1 EmplD PK,FK2 PositionID PK PK HD EmpFname EmpLname EmpBirth Date FK1 Job TypeName Job TypeDescr BeginDate EndDate CustTypeID CustFname CustLname CustAddress CustCity Cust State CustZip POH CUST_JOB_TASK PK JobTaskID JOB JobID TASK TaskID POSITION PositionID PK PK Posit PK FK1 FK2 -- - ORDER FK3 TaskName TaskDecsr PK FK4 FK5 Position Name Position Descr OrderID TaskID EquipID ToolID EmpSkillID JobID BeginTime EndTime JobName JobBeginDate JobEndDate FK1 Job TypelD FK2 CustID Job Descr FK1 JobID Order Date EQUIPMENT LINE ITEM PK LineItemID TOOL_TYPE ToolTypeID TOOL ToollD EQUIPMENT_TYPE PK EquipTypeID PK PK PK EquipID HOA --H FK1 FK1 OrderID FK2 ProductID Qty ToolTypeName ToolTypeDescr ToolName ToolTypeID ToolDescr Equip TypeName Equip TypeDescr FK1 Equip TypeID EquipName Equip Decsr PRODUCT ProductID PRODUCT_TYPE Product TypeID TOOL_CONDITION PK ToolConditionID CONDITION ConditionID PK PK PK DO--------- Condition Name ConditionDescr ProductName Price FK1 Product TypeID ProductTypeName Product TypeDescr FK1 Toolid FK2 ConditionID Begin Date

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

Step: 3

blur-text-image

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

outline some of the current issues facing HR managers

Answered: 1 week ago