Question

Fill in the blank to have a query to get the next 30 records on 5th...

  1. Fill in the blank to have a query to get the next 30 records on 5th page from database. Explanation (5pts)

SELECT * FROM products LIMIT __, __;

  1. Given the following database with 2 tables: (10pts)

Table fruits

name

calories

carbohydrates

fiber

apple

130

35

5.5

pear

102

40

3.3

grapefruit

60

22

3

orange

80

18

4

blueberries

20

3

1

watermelon

80

32

1.5

banana

120

29

2

Table weeklydiet

day

fruit

amount

Monday

apple

2

Monday

banana

1

Tuesday

apple

1

Wednesday

watermelon

2

Thursday

watermelon

1

What is the relationship between the 2 tables? (2 pts)

Which of the following queries returns exactly ONE record? Explain why? (8pts)

  1. SELECT * FROM fruits WHERE calories >= 120;
  2. SELECT * FROM fruits WHERE carbohydrates < 20 AND fiber < 3;
  3. SELECT carbohydrates, fiber FROM fruits WHERE carbohydrates < 20 OR fiber < 3;
  4. SELECT name, calorites FROM fruits WHERE name LIKE "p%";
  5. SELECT day FROM weeklydiet WHERE amount < 3 LIMIT 2,1;
0 0
Add a comment Improve this question Transcribed image text
Answer #1

SELECT * FROM products LIMIT 5,30;

it will select 30 items strating from 5 give the results.

there is a one-to-many relationship

SELECT name, calorites FROM fruits WHERE name LIKE "p%";

will return record conatining name starting with p only.

SELECT day FROM weeklydiet WHERE amount < 3 LIMIT 2,1;

it will return the record starting from 2 since there is limit i.e. 1 hence it returns only one record starting from 2

both will return exactly one record.

Add a comment
Know the answer?
Add Answer to:
Fill in the blank to have a query to get the next 30 records on 5th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need answers to these questions please and at the end are some questions to part...

    I need answers to these questions please and at the end are some questions to part 3 that I need help with too. 1.      Did your intake for the day you selected meet the recommendation to consume between 45-65% of total calories as carbohydrates? (Show calculations. Information can be found in chapter 2. Remember there are 4 calories/gram) 2.      During which meal did you consume the most carbohydrates? Which food(s) were the greatest contributors of carbohydrates? 3.      What nutrient dense...

  • Query the apartment table and find nearby restaurants with in 200 meters distance. I have two...

    Query the apartment table and find nearby restaurants with in 200 meters distance. I have two tables one gives the home adressses and second has near by businesses with latitude and longitude given. I need to find restaurants nearby the adress with in 200 meters. Each business also has longitude/latitude information, we can get the database to calculate distances to various useful points close by to each apartment. So we have two tables 1. Apartments and no 2 is business....

  • CASE ST STUDY 2 Amanda is convinced that white flour and white sugar cause her to...

    CASE ST STUDY 2 Amanda is convinced that white flour and white sugar cause her to overeat, resulting in an extra 30 pounds of weight she is carrying around. To control her impulse to Overeat, she has decided to eliminate all foods made with white or whole wheat flour and white sugar from her diet. Her total calorie needs are estimated to be 2000 per day. Yesterday, she ate the following Breakfast 2 scrambled ees and 2 sausage links 1...

  • 3. Compare the m o st from home with finansnede with the helm package pretesnacks. Which...

    3. Compare the m o st from home with finansnede with the helm package pretesnacks. Which is and why Note that wing the media half cup s is roughly equivalent to wings of pets pets or gram Nutrition Facts Wheel Rour Water Com Byne Pay Handel Cartons Sad 4. Evaluate your own dict. Write down every item you eat in a day and find the values of the nutrients contained in the foods. A medical dictionary is a good source...

  • Write an SQL query to list those properties that have never been sold. Design Tip When a property has sold, its information can be found in Sales table and vice versa. List each property with the foll...

    Write an SQL query to list those properties that have never been sold. Design Tip When a property has sold, its information can be found in Sales table and vice versa. List each property with the following four columns: property_id, primary_purpose, locality, and the area. Name the area coulmn as "Area". (Since the dataset might be incomplete, return "N/A" when the area is unknown for a property.) So the problem I got is that I got very similar output as...

  • Need answers. thank you VOCABULARY BUILDER Misspelled Words Find the words below that are misspelled; circle...

    Need answers. thank you VOCABULARY BUILDER Misspelled Words Find the words below that are misspelled; circle them, and then correctly spell them in the spaces provided. Then fill in the blanks below with the correct vocabulary terms from the following list. amino acids digestion clectrolytes nutrients antioxident nutrition basal metabolic rate extracellulare oxydation calories fat-soluble presearvatives catalist glycogen processed foods cellulose homeostasis saturated fats major mineral coenzyeme trace minerals diaretics metabolism water-soluable 1. Artificial flavors, colors, and commonly added to...

  • 1) It is estimated that approximately ________ million Americans have diabetes. A) 7 .3 B) 2...

    1) It is estimated that approximately ________ million Americans have diabetes. A) 7 .3 B) 2 6.6 C) 2 0.6 D) 2 9.1 2) The primary action of insulin is to A) increase blood glucose concentration. B) convert glucose to carbon dioxide and water. C) unlock cells to allow glucose to enter and be used as energy D) carry glucose into the liver. 3) Type 1 diabetes A) most often appears after the age of 40. B) occurs when normal...

  • 1) It is estimated that approximately ________ million Americans have diabetes. A) 7 .3 B) 2...

    1) It is estimated that approximately ________ million Americans have diabetes. A) 7 .3 B) 2 6.6 C) 2 0.6 D) 2 9.1 2) The primary action of insulin is to A) increase blood glucose concentration. B) convert glucose to carbon dioxide and water. C) unlock cells to allow glucose to enter and be used as energy D) carry glucose into the liver. 3) Type 1 diabetes A) most often appears after the age of 40. B) occurs when normal...

  • What advice would you give to Ana in terms of pre-event sports nutrition? Athletes need to...

    What advice would you give to Ana in terms of pre-event sports nutrition? Athletes need to follow the upper limit of the suggested amounts on MyPlate. Ana’s meals should be eaten at least 2-3 hours before her event, and she should avoid foods that are high in fat, protein, or fiber for at least 4 hours before her event. Carbohydrates are the best source of energy for her running events. Athletes should follow the recommendations from MyPlate. Endurance athletes should...

  • 7. (a) (15 pts.) With Figure 1 below showing shifts A and B, fill in the blank Table 1 showing the computation of the...

    7. (a) (15 pts.) With Figure 1 below showing shifts A and B, fill in the blank Table 1 showing the computation of the fraction of Bin Hours in each shift for the different time groups. VI V IV Group 1 A 9-12 13-16 17-20 21-24 Sunday Monday Tuesday Wednesday B B Thursday Friday Saturday Figure 1 Table 1 Computation of Fraction of Bin Hours in Each Shift Days Total in Shift A Fraction in Each Shift B Fraction in...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT