Ask Computer Engineering Expert

Business Data Management and Analytics Assignment: SQL Queries

SPECIFICATIONS

Read the following questions carefully. You will be asked to specify SQL queries to answer these questions.

QUESTIONS

You will be working with a set of tables for a Diet database. You can access these tables by using the DIET database on the mysql server. You are to prepare 10 SQL query statements that will provide answers to the following 10 requests for information.

1. Show a list of all the female people, that are more than 100kg, and has a blood type of AB positive. Show only the people who work in a company with the word "store" in the name. Show the FULL name of the person, using this specific format: given middle-initial surname (for example: Jeremy J. Kavanagh). Also show the person's age and company name.

2. Create a list of PIE foods that have more than 2000 calories of energy. Show the pie's name, fat, energy, and carbohydrates; show this list in order of energy with the highest energy first.

3. List all occupations where the assessing authority is the ACS, show this in ascending order of the ANZSCO codes. Show all the fields available.

4. The dietician wants to target all the people between 45 and 55 who have a high BMI that is classified in the Obese classes III. Generate a report that provide the full name, bmi (only show up to 2 decimal places) and email address of these people.

Body Mass Index Formula: The formulas to calculate BMI: BMI = weight(kg)/height2(m2) (Metric Units)

BMI Table for Adults: The World Health Organization's (WHO) recommended body weight based on BMI values for adults. It is used for both men and women, age 18 or older.

Category BMI range - kg/m2
Severe Thinness < 16
Moderate Thinness 16 - 17
Mild Thinness 17 - 18.5
Normal 18.5 - 25
Overweight 25 - 30
Obese Class I 30 - 35
Obese Class II 35 - 40
Obese Class III > 40

5. Provide a list of people who live in a street called "Settlement"; Show the name of the people and just the street number they live at in the street, sorted in street number order.

6. Create a list of each blood type and how many people in our database belong to each blood type. Show the blood type and the count of people only.

7. Show list of foods consumed between 10pm and 6am (night). Only show the food_id and the number of times consumed.

8. Display all the unit of measure (uom) and the number of foods that are measured by this uom. Only count foods that have ZERO cholesterol. Also, remove any uom groups that have only 1 food in the group.

9. List for each MONTH of the year, show how many people registered a consumed food and show how many items have been consumed. Sort this in month order.

10. The dieticians in the business want to get an idea of which states do not have many people involved in order to do more advertising and attract more people to the dietician service. Show only the state name and how many people live in that state. Only show the count of states with less than 200 people.

REQUIREMENTS

10 SQL queries that answer the questions asked, based on the data model and implemented database (on mo.its.rmit.edu.au) provided.

ASSESSMENT

Assessment of the data model will be based on the following areas (by the tutor):

• How well the query answers the questions, in relation to the case study provided.
• Understanding of data structure
• Efficiency and simplicity of resulting query

SUBMISSION

• SQL queries (output not required) only.
• Assignment will be submitted online using the canvas.
• By submitting online you are observing adhering to all the requirements specified on a standard assignment coversheet.

Attachment:- SQL-Queries.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92742549

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As