Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

The questions are broken into: Q1 (4 marks), Q2 (3 marks), Q3 and Q4 (3 marks). For all questions, provide the answer in the form of a SQL statement, with description before as necessary.

The questions are broken into: Q1 (4 marks), Q2 (3 marks), Q3 and Q4 (3 marks). For all questions, provide the answer in the form of a SQL statement, with description before as necessary.

The questions are broken into: Q1 (4 marks), Q2 (3 marks), Q3 and Q4 (3 marks). For all questions, provide the answer in the form of a SQL statement, with description before as necessary.

Questions

NOTES

Questions 1 and 2 require you to answer in the form of a SQL statement to create a table and insert data into it. The question and answer is only about the statements to create and put data into the

`Occurrence_Exercise` table, however it is recommended that you create the statements to create and insert data into all 3 tables, so that you can test that your statements are correct. Please only provide in your answer the SQL statement for the `Occurrence_Exercise` table.

To understand the terminology:

  • A rep is a number of times you do an attempted weight.
  • A set is an attempt and in this case, there are 3 attempts (attempt 1, attempt 2, attempt 3).
  • An attempt contains the weight.

So to understand the weight you would lift for a single exercise in the Exercise attempt table you would need to consider the rep multiplied by attempts by the weight. So for a single attempt:

e.g. for 9001

rep multiplied by attempts by the weight

8 reps x 3 attempts x 15kg = 360 total kg’s lifted

  • The following Gym application database for weight session recording is as follows. Write and run SQL statements for creating the Occurrence_Exercise table.
    • Include constraint values for the Condition Column: Heavy, Medium, Light
  • Write an SQL statement that will insert the data into Occurrence_Exercise table only.
    • Definition of rep stands for repetition.
    • Each exercise attempt has the rep number as indicated in the occurrence table.

Occurrence Table

OccurrenceID

Occ_Date

Occ_Place

Occ_Start_Time

Occ_Finish_Time

1

14/03/18

University_Gym

16:00:00

16:30:00

2

15/03/18

University_Gym

16:30:00

17:00:00

3

16/03/18

University_Gym

16:10:00

17:20:00

4

17/03/18

Home

07:00:00

08:00:00

5

17/03/18

University_Gym

17:00:00

18:00:00

Occurrence_Exercise Table

OccExID

ExerciseNo

OccurrenceID

Rep

Attempt1

Attempt2

Attempt3

Condition

9001

001A

1

8

15

15

15

Light

9002

002A

1

8

70

75

70

Medium

9003

003A

2

12

90

95

90

Heavy

9004

004A

3

12

200

200

200

Medium

9005

006A

3

8

110

110

115

Heavy

9006

005A

4

10

20

25

Medium

9007

001A

4

8

10

12

10

Medium

9008

002A

5

8

85

90

115

Heavy

Exercise Table

ExerciseNo

ExerciseDescription

ExerciseType

001A

Situps

Abs

002A

Bench Press

Chest

003A

Dead Lifts

Back

004A

Leg Press

Legs

005A

Seated Shoulder Press

Shoulders

006A

Squats

Legs

007A

Lat pull downs

Lats

Create the following queries:

  • Find the exercise which contains the maximum total weight lifted
    • Show: Exercise, Maximum weight
    • Ensure you show captions for each of the columns
    • Hint: you would need to consider the number of times the weight is lifted and weight

e.g. rep multiplied by attempt multiplied by the weight

  • Find the exercise that the user was not able to complete 3 attempts in, or the exercise that the user has not attempted.
    • Show appropriate columns
    • List in ascending order exercise type
    • Do not show repeated names
    • Ensure you show captions for each of the columns

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.