1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svetradugi [14.3K]
3 years ago
8

You’ve been hired to work on a web site that maintains customer reviews of products. The main data is stored in the following ta

bles: Product(Product ID, Product Name, Description) Reviewer(Reviewer ID, Reviewer Name, City) Review(Reviewer ID, Product ID, Rating, Comment) The tables contain the following information:
Product: unique product id (Product ID), product name (Product Name), and product description. All strings. • Reviewer: unique reviewer id (Reviewer ID), and reviewer name (Reviewer Name) and city, also all strings. • Review: One entry for each individual review giving the reviewer and product ids, an integer rating in the range 0‐5, and the reviewer comment, which is a string.
A) Write a SQL query that returns the number of reviewers in each distinct city. The results should list the city name and the number of reviewers in that city, and should be sorted alphabetically by city name.
B) Write a SQL query that returns the average of the reviews for each reviewer and names of the reviewers for all reviewers that have an average review (of all their reviews) of less than or equal to 2.
Computers and Technology
1 answer:
olya-2409 [2.1K]3 years ago
6 0

Answer:

See explaination

Explanation:

a.

//to create product table

CREATE TABLE PRODUCT

(

PRODUCTID VARCHAR2(50) NOT NULL

, PRODUCTNAME VARCHAR2(50) NOT NULL

, DESCRIPTION VARCHAR2(50) NOT NULL

, CONSTRAINT PRODUCT_PK PRIMARY KEY

(

PRODUCTID

)

);

//to create Reviewer table

CREATE TABLE REVIEWER

(

REVIEWERID VARCHAR2(50) NOT NULL ,

REVIEWERNAME VARCHAR2(50) NOT NULL ,

CITY VARCHAR2(50) NOT NULL ,

CONSTRAINT REVIEWER_PK PRIMARY KEY ( REVIEWERID )

);

// to create Review table

CREATE TABLE REVIEW

(

REVIEWERID VARCHAR2(50) NOT NULL ,

PRODUCTID VARCHAR2(50) NOT NULL ,

RATING NUMBER(5, 0) NOT NULL ,

COMMENTS VARCHAR2(50) NOT NULL ,

CONSTRAINT REVIEW_PK PRIMARY KEY ( REVIEWERID , PRODUCTID )

);

b.

SELECT CITY,COUNT( REVIEWERID) NOOFREVIEWERS FROM REVIEWER GROUP BY CITY ORDER BY CITY ;

EXPLANATION

GROUP BY clause classifies the data in the table it avoids duplicates in the table

ORDER BY clause by default sort the table in ascending order

in the select clause city is the single column count is group function so we must need to write group by clause

otherwise we will get

SQL Error: ORA-00937: not a single-group group function

You might be interested in
Asking yourself questions can help you think of what to _____, in order to get answers.
Olenka [21]
Ask your self questions can help you think of what to measure, in order to get answers.
8 0
3 years ago
How do I fix this on my HiSense Roku tv this is on Xfinity Stream Beta the error number is -500
yawa3891 [41]

Answer:

it is something that you have to call your nearest xfinity store

i had the same problem but got it fixed

Explanation:

7 0
3 years ago
Read 2 more answers
PLTW IM Chapter 1.2-1.3 i need this please
Luden [163]

<u>Answer:</u>

<em><u>Biomedical Science</u></em>

<em><u>The application of the principles of the natural sciences, especially biology and physiology to clinical medicine</u></em>

<em><u>Control group</u></em>

<em><u>The group in an experiment where the independent variable being tested is not applied so that it may serve as a standard for comparison against the experimental group where the independent variable is applied.</u></em>

<em><u>Dependent Variable</u></em>

<em><u>The measurable affect, outcome, or response in which the research is interested.</u></em>

<em><u>Experiment</u></em>

<em><u>A research study conducted to determine the effect that one variable has upon another variable</u></em>

<em><u>Forensic Science</u></em>

<em><u>The application of scientific knowledge to questions of civil and criminal law</u></em>

<em><u>Hypothesis</u></em>

<em><u>Clear prediction of anticipated results of an experiment</u></em>

<em><u>Independent Variable</u></em>

<em><u>The variable that is varied or manipulated by the researcher</u></em>

<em><u>Negative control</u></em>

<em><u>Control group where the conditions produce a negative outcome. Negative control groups help identify outside influences which may be present that were not accounted for when the procedure was created</u></em>

<em><u>Personal protective equipment</u></em>

<em><u>Specialized clothing or equipment, worn by an employee for protection against infectious materials.(as defined by OSHA)</u></em>

<em><u>Positive control</u></em>

<em><u>Group expected to have a positive result, allowing the researcher to show that the experiment set up was capable of producing results.</u></em>

<em><u>Adenine</u></em>

<em><u>A component of nucleic acids, energy carrying molecule such as ATP, and certain co enzymes. Chemically it is a purine base.</u></em>

<em><u>Chromosome</u></em>

<em><u>Any of the usually linear bodies in the nucleus that contain genetic material.</u></em>

<em><u>Cytosine</u></em>

<em><u>A component of nucleic acids that carries hereditary information in DNA and RNA in cells . Chemically it is a pyrimidine base.</u></em>

<em><u>Deoroxyribonucleic acid</u></em>

<em><u>A double-stranded helical nucleic acid molecule capable of replicating and determining the inherited structure of a cell proteins</u></em>

<em><u>Gel electrophoresis</u></em>

<em><u>The separation of nucleic acids or proteins, on the basis of their size and electrical charge, by measuring their movement through an electrical field in a gel.</u></em>

<em><u>Gene</u></em>

<em><u>A discrete unit of hereditary information consisting of a specific nucleotide sequence in DNA.( or RNA in some viruses).</u></em>

<em><u>Guanine</u></em>

<em><u>A component of nucleic acids that carries hereditary information in DNA and RNA in cells. Chemically it is a purine base.</u></em>

<em><u>Helix</u></em>

<em><u>Something in spiral form.</u></em>

<em><u>Model</u></em>

<em><u>A simplified version of something complex used, for example, to analyze and solve problems or make predictions.</u></em>

<em><u>Nucleotide</u></em>

<em><u>A building block of DNA, consisting of a 5 carbon sugar convalently bonded to a nitrogenous base and a phosphate group.</u></em>

<em><u>Restriction enzymes</u></em>

<em><u>A degradative enzyme that recognizes specific nucleotide sequences and cuts up DNA</u></em>

<em><u>Restriction fragment length polyphorisms (RFLPs)</u></em>

<em><u>Differences in DNA sequences on homologous chromosomes that can result in different patterns of restriction fragment lengths (DNA segments resulting from treatment with restriction enzymes)</u></em>

<em><u>Thymine</u></em>

<em><u>A component of nucleic acid that carries hereditary information in DNA cells. Chemically, it is a pyrimidine base</u></em>

<em><u>Autopsy</u></em>

<em><u>An examination of the body after death usually with such dissections as will expose the vital organs for determining the cause of death</u></em>

<em><u>Bibliography</u></em>

<em><u>a document showing all the sources used to research information</u></em>

<em><u>Citation</u></em>

<em><u>A written reference to a specific work by a particular author or creator which identifies the document in which the work may be found</u></em>

<em><u>Documentation</u></em>

<em><u>The act of creating citations to identify resources used in writing a work</u></em>

<em><u>Health Insurance Portability and Accountability Act (HIPAA)</u></em>

<em><u>A comprehensive set of standards and practices designed to give patients specific rights regarding their personal health information</u></em>

<em><u>Medical examiner</u></em>

<em><u>A physician who performs an autopsy when death may be accidental or violent. He/she may also serve in some jurisdictions as the coroner.</u></em>

Explanation:

This is what I found when I searched up <u>pltw chapter 1.2-1.3 answers.</u>

I did this because there was not really a question in there.

PS:

I'm sorry if this is too long for you to read.

Give me brainliest, if you want to, that is.

7 0
2 years ago
DDL statement for adding a column to an existing table is
vaieri [72.5K]

Answer:to add a column to existing table.

to rename any existing column.

to change datatype of any column or to modify its size.

to drop a column from the table.

Explanation:

hope this help

4 0
2 years ago
In a mailbox based message passing system, a process is not put in a waiting queue but receives an error signal upon sending to
Daniel [21]

Answer:

Yes.

Explanation:

Race condition can be described as a situation where at any time there are two or more processes or threads operating concurrently, there is potential for a particularly difficult class of problems. The identifying characteristic of race conditions is that the performance varies depending on which process or thread executes their instructions before the other one, and this becomes a problem when the program runs correctly in some instances and incorrectly in others. Race conditions are notoriously difficult to debug, because they are unpredictable, unrepeatable, and may not exhibit themselves for years.

6 0
3 years ago
Other questions:
  • ______________ is only one of the marketing mix tools that acompany uses to achieve its marketing objectives.
    7·1 answer
  • Match the careers with the career clusters.
    5·2 answers
  • Write down the pseudo code of a program that calculates the Body Mass Index (BMI) of
    9·1 answer
  • One way to prepare for filing the PROFILE is to:
    12·2 answers
  • Suppose you are on a desert island and possess exactly 20 coconuts your neighbor Friday is a fisherman and he is willing to trad
    14·1 answer
  • When clients connect to a web server using the _________ method, the server logs them on using the iusr account, by default?
    14·1 answer
  • Which line of code will eliminate the element “calculator” from an array of supplies?
    13·1 answer
  • Which type of loan is based on financial need
    6·1 answer
  • Now the y0utube home screen is gone
    13·2 answers
  • Colorful bead bracelet in codehs
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!