SQL: Create a SQL query that uses an uncorrelated subquery and no joins to display the descriptions for products provided by a vendor in area code 615. Remember, the main difference between a correlated subquery and uncorrelated subquery is that, in a correlated subquery, the inner query is dependent upon the outer query, while, with an uncorrelated query, the inner query does not depend upon the outer query. Instead, it runs just once. You should NOT use union, minus, or intersect in this query. The outer query will use the PRODUCT table and the inner query will use the VENDOR table [hint: you should have 9 records of output].   My code: select p_descript from product where (select v_areacode from vendor where v_areacode = '615' ; I am getting this error, problem is I can't see what is missing any assistance is appreciated.  ORA-00936: missing expression

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

SQL:

Create a SQL query that uses an uncorrelated subquery and no joins to display the descriptions for products provided by a vendor in area code 615. Remember, the main difference between a correlated subquery and uncorrelated subquery is that, in a correlated subquery, the inner query is dependent upon the outer query, while, with an uncorrelated query, the inner query does not depend upon the outer query. Instead, it runs just once. You should NOT use union, minus, or intersect in this query. The outer query will use the PRODUCT table and the inner query will use the VENDOR table [hint: you should have 9 records of output].

 

My code:

select p_descript from product where (select v_areacode from vendor where v_areacode = '615' ;

I am getting this error, problem is I can't see what is missing any assistance is appreciated. 

ORA-00936: missing expression

 

# Database Schema Overview

This educational page provides a breakdown of a relational database schema, explaining each entity, its attributes, and the relationships among these entities. This schema can be used for understanding basic database design concepts and data relationships.

## Entity-Relationship Diagram Breakdown

### Entities and Attributes

1. **CUSTOMER**
   - **CUS_CODE**: Customer code (Primary Key)
   - **CUS_LNAME**: Customer last name
   - **CUS_FNAME**: Customer first name
   - **CUS_INITIAL**: Customer initial
   - **CUS_AREACODE**: Area code of customer
   - **CUS_PHONE**: Customer phone number
   - **CUS_BALANCE**: Customer balance

2. **INVOICE**
   - **INV_NUMBER**: Invoice number (Primary Key)
   - **CUS_CODE**: Customer code (Foreign Key)
   - **INV_DATE**: Invoice date

3. **LINE** (Line items in an invoice)
   - **INV_NUMBER**: Invoice number (Foreign Key)
   - **LINE_NUMBER**: Line item number (Primary Key)
   - **P_CODE**: Product code (Foreign Key)
   - **LINE_UNITS**: Number of units
   - **LINE_PRICE**: Price per unit

4. **PRODUCT**
   - **P_CODE**: Product code (Primary Key)
   - **P_DESCRIPT**: Product description
   - **P_INDATE**: Product introduction date
   - **P_QOH**: Quantity on hand
   - **P_MIN**: Minimum quantity
   - **P_PRICE**: Product price
   - **P_DISCOUNT**: Product discount
   - **V_CODE**: Vendor code (Foreign Key)

5. **VENDOR**
   - **V_CODE**: Vendor code (Primary Key)
   - **V_NAME**: Vendor name
   - **V_CONTACT**: Vendor contact person
   - **V_AREACODE**: Vendor area code
   - **V_PHONE**: Vendor phone number
   - **V_STATE**: Vendor state
   - **V_ORDER**: Vendor order

6. **EMPLOYEE**
   - **EMP_NUM**: Employee number (Primary Key)
   - **EMP_TITLE**: Employee title
   - **EMP_LNAME**: Employee last name
   - **EMP_FNAME**: Employee first name
Transcribed Image Text:# Database Schema Overview This educational page provides a breakdown of a relational database schema, explaining each entity, its attributes, and the relationships among these entities. This schema can be used for understanding basic database design concepts and data relationships. ## Entity-Relationship Diagram Breakdown ### Entities and Attributes 1. **CUSTOMER** - **CUS_CODE**: Customer code (Primary Key) - **CUS_LNAME**: Customer last name - **CUS_FNAME**: Customer first name - **CUS_INITIAL**: Customer initial - **CUS_AREACODE**: Area code of customer - **CUS_PHONE**: Customer phone number - **CUS_BALANCE**: Customer balance 2. **INVOICE** - **INV_NUMBER**: Invoice number (Primary Key) - **CUS_CODE**: Customer code (Foreign Key) - **INV_DATE**: Invoice date 3. **LINE** (Line items in an invoice) - **INV_NUMBER**: Invoice number (Foreign Key) - **LINE_NUMBER**: Line item number (Primary Key) - **P_CODE**: Product code (Foreign Key) - **LINE_UNITS**: Number of units - **LINE_PRICE**: Price per unit 4. **PRODUCT** - **P_CODE**: Product code (Primary Key) - **P_DESCRIPT**: Product description - **P_INDATE**: Product introduction date - **P_QOH**: Quantity on hand - **P_MIN**: Minimum quantity - **P_PRICE**: Product price - **P_DISCOUNT**: Product discount - **V_CODE**: Vendor code (Foreign Key) 5. **VENDOR** - **V_CODE**: Vendor code (Primary Key) - **V_NAME**: Vendor name - **V_CONTACT**: Vendor contact person - **V_AREACODE**: Vendor area code - **V_PHONE**: Vendor phone number - **V_STATE**: Vendor state - **V_ORDER**: Vendor order 6. **EMPLOYEE** - **EMP_NUM**: Employee number (Primary Key) - **EMP_TITLE**: Employee title - **EMP_LNAME**: Employee last name - **EMP_FNAME**: Employee first name
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education