Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

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

What is the difference between dekkers algorithm and igloo

What is the difference between Dekkers Algorithm and Igloo approach? Please provide examples that can explain this.

Starbucks the enclosed is the strategy definition for

Starbucks: The enclosed is the Strategy Definition for Starbucks. ( 1-2 pages rought draft) Using one of the cases studies in the text or one identifed by the team on its own, prepare a report addressing the following ke ...

The systems development lifecycle sdlc provides a

The systems development lifecycle (SDLC) provides a standardized process for all phases of any system development. What are the different phases involved in SDLC give a brief note on all its phases in your own words. (no ...

Identify and evaluate at least three considerations that

Identify and evaluate at least three considerations that one must plan for when designing a database. Suggest at least two types of databases that would be useful for small businesses, two types for regional level organi ...

What is the example of social behavior or a social

What is the example of social behavior or a social situation that seems inconsistent with the fundamental presupposition, and why this example could be inconsistent?

Social networking sites such as myspace and facebook pose

Social networking sites such as MySpace and Facebook pose interesting new questions for privacy protection. Describe how privacy may be threatened by the use of these sites. Are these problems significant? How should pri ...

Can someone explain to me how stooge works in the most

Can someone explain to me how Stooge works in the most simplified way. Because am having a hard time understanding it. There was an example on youtube that goes like this: if you are given a small array of numbers that w ...

Determine the molar volume of co2 at 400 k and 100 atm

Determine the molar volume of CO2 at 400 K and 100 atm using the van der Waals equation with a = 3.592 l^2atm mol^-2 and b = 0.04267 l/mol

Explain the two real world examples of database what are

Explain the two real world examples of database. What are they? How do people use them? Discuss at least one situation that would arise from problems in these database, such as redundant information, breach of informatio ...

Question share your favorite open web resource and what

Question : Share your favorite open web resource and what cool tools does it have? What can you learn from it? How will it help as a career resource? What is your favorite learning express or JCA course, tool, or Page. W ...

  • 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