Write a query to display the details of all the 'bills' with the due_date on '2017-10-01'.Display the records in descending order based on their payable_amount.Note:1. Display all the columns present in the bill table.2. Specify the condition and retrieve the correct rows in the result(condition need to be specified on due_date column).3. You can compare your executed result with the sample output given below.4. Order by is mandatorySample Output: [Only few records are shown here]SubmitSaveExecutePrevious Submission
Question
Write a query to display the details of all the 'bills' with the due_date on '2017-10-01'.Display the records in descending order based on their payable_amount.Note:1. Display all the columns present in the bill table.2. Specify the condition and retrieve the correct rows in the result(condition need to be specified on due_date column).3. You can compare your executed result with the sample output given below.4. Order by is mandatorySample Output: [Only few records are shown here]SubmitSaveExecutePrevious Submission
Solution
Based on your instructions, here is the SQL query you need:
SELECT *
FROM bills
WHERE due_date = '2017-10-01'
ORDER BY payable_amount DESC;
This query will select all columns from the 'bills' table where the 'due_date' is '2017-10-01'. The results will be ordered in descending order based on the 'payable_amount'.
Similar Questions
Write a query to display the details of all the 'bill' with the due_date on '2017-10-01'.Display the records in descending order based on their payable_amount.
Write a query to display the details of the 'bill' whose payment is not completed. Display the records in ascending order based on due_date.Note:1. Display all the columns present in the bill table.2. Specify the condition and retrieve the correct rows in the result. (condition need to be specified on is_payed column. If is_payed is 0, then the payment is not completed.)3. You can compare your executed result with the sample output given below.4. Order by is mandatorySample output: [Only few records are shown here]
Write a query to display all the details of all the 'bills' whose payment_date is on the year 2018, sorted by payable_amount in descending order.Note:1. Display all the columns present in the bill table.2. Specify the condition and retrieve the correct rows in the result(condition need to be specified on payment_date column).3. You can compare your executed result with the sample output given below.4. Order by is mandatorySample Output:
Write a query to display the details of all the bills whose 'total_units' greater than 10000, sorted by total_units in descending order.Note:1. Display all the columns present in the bill table.2. Specify the condition and retrieve the correct rows in the result(condition need to be specified on total_units column).3. You can compare your executed result with the sample output given below.4. Order by is mandatorySample Output: [Only few records are shown here]SubmitSaveExecutePrevious Submission1
Write a query to display all the details of bills whose payment_date is on 2nd day of the month and also display the records in descending order based on the total_units.Note:1. Display all the columns present in the bill table whose payment_date is on 2nd day of the month. (day will be 01,02,03,...31)2. Order by is mandatory3. Compare your executed result with the sample output given below.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.