Question

how can i add join sql table in order to get results. product_tble(product_id(pk),product_name,product_descrip) discount_tbl(discount_code,discount_amount) i want...

how can i add join sql table in order to get results.

product_tble(product_id(pk),product_name,product_descrip)

discount_tbl(discount_code,discount_amount)

i want show the subtotal after(product_price-discount_amount)

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

There is no common column between the tables that you gave so join is not possible.

You may have other table .you should post also that. so that i can find link between the tables to query the same.

hope you got the point .

Add a comment
Know the answer?
Add Answer to:
how can i add join sql table in order to get results. product_tble(product_id(pk),product_name,product_descrip) discount_tbl(discount_code,discount_amount) i want...
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'm making a Report in SQL and need to add Release_Year which is in the Film...

    I'm making a Report in SQL and need to add Release_Year which is in the Film table in this query, how can I do that? Thank You Select Title, count(Rental_ID) as Rentals, (rental_rate*Count(rental_id)) As Revenue From Film join Inventory on Film.Film_ID = Inventory.Film_ID join rental on rental.inventory_id = inventory.inventory_id Group By Title Order By Revenue Desc

  • In oracle sql, how do I add "not null constraint" at end of create table block...

    In oracle sql, how do I add "not null constraint" at end of create table block and give it a name without using the CHECK constraint? Is it e.g., CONSTRAINT constraintName NOT NULL If so, then how does the statement know which columnName I'm referring to to make NOT NULL? I know that I can do this after declaring the column, what I'm wondering about is how to do this after declaring all the columns.

  • How do I add images to the last columns named Product_Image and Product_Thumbnail? Need code for...

    How do I add images to the last columns named Product_Image and Product_Thumbnail? Need code for stored procedure and code behind if needed. TABLE INFO CREATE TABLE [dbo].[ExampleTable] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Product_ID] VCHAR (50) NOT NULL, [Product_Name] VCHAR (50) NOT NULL, [Product_Image] IMAGE NULL, [Product_Thumbnail] IMAGE NULL, PRIMARY KEY CLUSTERED ([Id] ASC) )

  • SQL help I am using livesql.oracle This is CTE I created for problem 4 SELECT CUST_LAST_NAME,...

    SQL help I am using livesql.oracle This is CTE I created for problem 4 SELECT CUST_LAST_NAME, CUST_EMAIL, ORDER_ID, SUM(QUANTITY) AS QTY FROM (SELECT CUST_LAST_NAME, CUST_EMAIL, ORDERS.ORDER_ID, PRODUCT_ID, QUANTITY FROM OE.CUSTOMERS INNER JOIN OE.ORDERS ON OE.CUSTOMERS.CUSTOMER_ID = OE.ORDERS.CUSTOMER_ID INNER JOIN OE.ORDER_ITEMS ON OE.ORDERS.ORDER_ID = OE.ORDER_ITEMS.ORDER_ID ORDER BY ORDER_ID ASC) CTE GROUP BY CUST_LAST_NAME, CUST_EMAIL, ORDER_ID; 5. Using the CTE named customer_information that you created for the previous problem (problem 4). Add a correlated subquery that also shows the total value of...

  • Create the database and tables for the database. Show all SQL statements. Include primary and foreign...

    Create the database and tables for the database. Show all SQL statements. Include primary and foreign keys. Insert data into each table. Show select statements and display the output of each table. Note:Student’s name must be inserted into table as part of the data! Perform the SQL below: Query one table and use WHERE to filter the results. The SELECT clause should have a column list, not an asterisk (*). State the purpose of the query; show the query and...

  • I want the create table sql from the below ER Diagram - Invoice Insurance insurancelD (PK)...

    I want the create table sql from the below ER Diagram - Invoice Insurance insurancelD (PK) cyType invoicelD (PK) eck datePaid VehicleType rentalPrice /finalCost make (PK) model (PK) DailyTariff 0..1 1.1 0..1 rs 0.." tariffID (PK) bodh conditions policyNumber Records trim Generated for 1..1 1..1 Tariffs Has a Insures PersonalClient 0.. 1..1 Hired 0 Vehicle 0. HiredVehicle 1 1-1 na ame regNum (PK) date (PK) IName fleetNum cardType title 11 Nominate driversNum Ca Client kilometrage Schedules 0 1.1 days 1.1...

  • MYSQL Applied Database I just want to make sure that the syntax looks okay for my...

    MYSQL Applied Database I just want to make sure that the syntax looks okay for my database SQL statements, any help would be much appreciated: 1.A query that asks for customer star review for Tony Stark on Opportunity Detail. SELECT CONCAT (employee_first_name,' ',employee_last_name) AS                            employee_name, review_star_count, FROM customer_reviews, JOIN e employees ON employee_id =employee_id, WHERE employee_id=4 AND opportunity_id=1; 2.A query that shows how many orders Additional Dot Twain License, in an order totaling over $900. SELECT product_name, COUNT(o.OrderID) AS...

  • this is about databases and SQL, please help me with this and i promise i will...

    this is about databases and SQL, please help me with this and i promise i will thumbs you up :) let me know if you need more info please try to get this done i will definitely thumbs you up :)) PROJECT TOPIC: Library: Books, Copies of the books, Patrons, Checkouts when creating ERD diagram, the notation must be in crows notation, attached at the bottom is an example of crows foot notation in databases so you can understand. PDF...

  • this is about databases and SQL, please help me with this and i promise i will...

    this is about databases and SQL, please help me with this and i promise i will thumbs you up :) let me know if you need more info please try to get this done i will definitely thumbs you up :)) PROJECT TOPIC: Library: Books, Copies of the books, Patrons, Checkouts when creating ERD diagram, the notation must be in crows notation, attached at the bottom is an example of crows foot notation in databases so you can understand. PDF...

  • Which SQL statement retrieves the EmployeeName and City columns from the Employees table? O LIST EmployeeName,...

    Which SQL statement retrieves the EmployeeName and City columns from the Employees table? O LIST EmployeeName, City ON Employees; O FIND EmployeeName, City ON Employees; SELECT EmployeeName, City FROM Employees; O RETRIEVE EmployeeName, City FROM Employees; Which SQL statement finds the different cities in which national parks reside with no duplicate rows listed? SELECT DISTINCT city FROM natlpark ORDER BY city; O ORDER BY natlpark DISTINCT city; O ORDER BY city FROM natlpark; O SELECT city FROM natlpark ORDER BY...

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