It is one of the most common SQL Scenario based Interview Question. In this video, it has been shown how to get the Net Balance derived from Amount depending upon Debit and Credit.
Input Table :
Output Table :
It is one place for SQL,ORACLE, datawarehouse and testing concepts
It is one of the most common SQL Scenario based Interview Question. In this video, it has been shown how to get the Net Balance derived from Amount depending upon Debit and Credit.
Input Table :
) N ON N.nbr <= MT.quantity
Order_Tbl has four columns namely ORDER_DAY, ORDER_ID, PRODUCT_ID, QUANTITY and PRICE
Order_Tbl Table
PART A
Write a SQL query to get the highest sold Products (Quantity*Price) on both days.
OUTPUT TABLE
PART B
Write a SQL query to get all product's total sales on 1st May and 2nd May adjacent to each other.
OUTPUT TABLE
PART C
Write a SQL query to get all products day wise, that was ordered more than once.
OUTPUT TABLE
SOLUTION
PART A
SELECT A.ORDER_DAY,B.PRODUCT_ID ,A.Sold_Amount