Question

what is wrong with this database says inner is not a table SELECT last_name, first_name, job_title,...

what is wrong with this database says inner is not a table

SELECT last_name, first_name, job_title, salary, min_salary, max_salary,
city, state_province, country_name
FROM employees INNER JOIN jobs ON employees.job_id = jobs.job_id,
INNER JOIN departments dep ON employees.department_id = dep.department_id
INNER JOIN locations ON dep.locations_id = locations.location_id
INNER JOIN countries ON locations.country_id = countries.country_id
WHERE dep.location_id = 1700
ORDER BY salary DESC;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per requirement submitted above kindly find below solution.

Error details :

  • There is comma (,) at the end of the first inner join that is at the end of the line three remove that comma

Below is the corrected SQL query.

SELECT last_name, first_name, job_title, salary, min_salary, max_salary,
city, state_province, country_name
FROM employees INNER JOIN jobs ON employees.job_id = jobs.job_id
INNER JOIN departments dep ON employees.department_id = dep.department_id
INNER JOIN locations ON dep.locations_id = locations.location_id
INNER JOIN countries ON locations.country_id = countries.country_id
WHERE dep.location_id = 1700
ORDER BY salary DESC;

NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
what is wrong with this database says inner is not a table SELECT last_name, first_name, job_title,...
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
  • What is wrong with the following SQL statement? select first_name , last_name , phone from Customer,...

    What is wrong with the following SQL statement? select first_name , last_name , phone from Customer, Orders where customer.customerid = orders.customerid; Group of answer choices 1 You cannot join customer.customerid to orders.cutomerid 2 Nothing is wrong with this statement. 3 The join is wrong. You can only join tables in the FROM clause. 4 The result will be a Cartesian Product.

  • SQL From employees table, display the first_name, last_name, phone_number and Phone number Type. ...

    SQL From employees table, display the first_name, last_name, phone_number and Phone number Type. Phone number type should be "USA Phone Number" (Length=12) or "International Phone Number" (Length=18) or "Unknown" based on the length of the phone number. Sort the display in desc order of phone number type Use Either CASE or DECODE. Output Column Heading: First Name, Last Name, Phone Number, Phone Number Type

  • SQL From employees table, display the first_name, last_name, phone_number and Phone number Type. Phone number type...

    SQL From employees table, display the first_name, last_name, phone_number and Phone number Type. Phone number type should be "USA Phone Number" (Length=12) or "International Phone Number" (Length=18) or "Unknown" based on the length of the phone number. Sort the display in desc order of phone number type Use Either CASE or DECODE. Output Column Heading: First Name, Last Name, Phone Number, Phone Number Type

  • How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee...

    How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee WHERE salary BETWEEN 10000 AND 30000; in relational algebraic syntax?

  • 13 Write a query to display each department’s name, location, number of employees, and the average...

    13 Write a query to display each department’s name, location, number of employees, and the average salary for all employees in that department. Label the columns Department , Location, Number of Workers, and Average Salary, respectively. Round the average salary to two decimal places . Tables (Filtered) + COUNTRIES DEPARTMENTS 0 DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID 1 LOCATION_ID 0 EMPLOYEES - EMPLOYEE_ID 1 FIRST_NAME LAST_NAME EMAIL IPHONE_NUMBER HIRE_DATE JOB_ID SALARY 0 COMMISSION_PCT " MANAGER_ID " DEPARTMENT_ID + JOB_GRADES - JOB_HISTORY + JOBS...

  • QUESTION 27 The SET command is used in which statement UPDATE SELECT DISTINCT DELETE FROM INSERT...

    QUESTION 27 The SET command is used in which statement UPDATE SELECT DISTINCT DELETE FROM INSERT VALUES QUESTION 28 Which view would you use to see only the tables you have created ALL_TABLES USER_TABLES USER_TABS ALL_OBJECTS QUESTION 29 Which command should you use to write logical units of work to disk permanently SAVEWORK COMMIT ROLLBACK INSERT QUESTION 30 A Top-N Analysis is capable of ranking a top or bottom set of results. True False QUESTION 31 If you are performing...

  • Consider the table actor which already exists in our database, with 200 rows. Upon executing SHOW...

    Consider the table actor which already exists in our database, with 200 rows. Upon executing SHOW CREATE TABLE `actor`, we get the following: CREATE TABLE `actor` ( `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(10) NOT NULL, `last_name` varchar(10) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`actor_id`), KEY `idx_actor_last_name` (`last_name`) ) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 You will need this table for any questions below which refer to an `actor` table. 1. Using the actor...

  • Hi this is for SQL Use the AP database Vendor name from the vendor table Vendor...

    Hi this is for SQL Use the AP database Vendor name from the vendor table Vendor Contact First Name and Vendor Contact Last Name from the vendor table but I need them concatenated together with a space between the names Invoice Date from the invoice table Only the day of from the Invoice Date Invoice Number from the invoice table The third and fourth characters from the Invoice Number Line Item Amount from the invoice line items table Calculate the...

  • Use the HR database for all the questions in this lab. For each item in this lab, paste the SQL y...

    Use the HR database for all the questions in this lab. For each item in this lab, paste the SQL you used to complete the task and the number of rows retrieved. Ensure you follow the coding standards listed in the ETSU SQL standards guide found on D2L. Save this document as a PDF and name it your_name_lab7.pdf Display the employees’ first name, last name and phone number of employees with salaries greater than 10,000 dollars. SELECT first_name, last_name, phone_number,...

  • Database in using Employees table given able Write a SELECT statement to get employees first name...

    Database in using Employees table given able Write a SELECT statement to get employees first name and starts with "A" 25). Write a SQL code for the following inquiries us reccords in the employees table where Write a SELECT statement to count the number of r lastname starts with "C" question "B" 2) If you have to write a SOL code to ioin between EMPLOY e will you join on? Provide the column name. ) I which col

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