Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Calculate the total revenue generated by each customer in the last three months.
Home
Oracle
Calculate the total revenue generated by each customer in the last three months.
0
votes
asked
Jan 23
in
Oracle
by
SakshiSharma
Calculate the total revenue generated by each customer in the last three months.
oracle-query
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 23
by
SakshiSharma
SELECT customer_id, SUM(revenue) AS total_revenue
FROM sales
WHERE transaction_date >= TRUNC(SYSDATE) - INTERVAL '3' MONTH
GROUP BY customer_id;
Related questions
0
votes
Q: Calculate the percentage of total sales each product contributes to the overall revenue.
asked
Jan 23
in
Oracle
by
SakshiSharma
query-sql
0
votes
Q: Imagine you want to identify employees who are eligible for promotions based on their years
asked
Jan 23
in
Oracle
by
SakshiSharma
oracle-query
0
votes
Q: Case Study: Sales Analysis System. The dataset contains information about sales transactions in a company.
asked
Jan 23
in
Oracle
by
SakshiSharma
oracle-query
0
votes
Q: Imagine you have an Inventory table with product_id and quantity columns
asked
Jan 23
in
Oracle
by
SakshiSharma
oracle-query
0
votes
Q: You have an Employees table with columns for employee names and their respective managers
asked
Jan 23
in
Oracle
by
SakshiSharma
oracle-query
0
votes
Q: Write an Oracle SQL query to find the five most common names in the Employee table.
asked
Jan 23
in
Oracle
by
SakshiSharma
oracle-query
0
votes
Q: How would you update the status column of the orders table to set all orders
asked
Jan 21
in
Oracle
by
rajeshsharma
oracle-query
0
votes
Q: If a risk has a 20 percent chance of happening in a given month, and the project is expected to last five months, what is the probability that the risk event will occur during the fourth month of the project?
asked
Oct 31, 2022
in
Agile
by
Robin
pmp
agile
risk
0
votes
Q: Say you have two subsets of a dataset for which you know their means and standard deviations. How do you calculate the blended mean and standard deviation of the total dataset? Can you extend it to K subsets?
asked
Jun 28, 2023
in
Statistics and Probability Basics
by
SakshiSharma
dataset
0
votes
Q: Whether any commands are used for Months calculation? If so, What are they?
asked
Jan 17
in
Oracle
by
AdilsonLima
oracle-interview-questions-answers
...