1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Yuliya22 [10]
2 years ago
6

What is thesql command to list the total sales by customer , month , and product, with subtotals by customer and by month and a

grand total for all product sales
Computers and Technology
1 answer:
alexira [117]2 years ago
4 0

Answer:

The answer is below

Explanation:

The the sql command to list the total sales by customer , month , and product, with subtotals by customer and by month and a grand total for all product sales is:

SELECT S.CUS_CODE, T.TM_MONTH, S.P_CODE,

SUM(S.SALE_UNITS*S.SALE_PRICE) AS "TOTSALES"

FROM DWDAYSALESFACT AS S INNER JOIN DWTIME AS T ON S.TM_ID =

T.TM_ID

GROUP BY S.CUS_CODE,T.TM_MONTH,S.P_CODE WITH ROLLUP;

You might be interested in
Write a function called first_last that takes a single parameter, seq, a sequence. first_last should return a tuple of length 2,wh
motikmotik

Answer:

The Python code with the function is given below. Testing and output gives the results of certain chosen parameters for the program

Explanation:

def first_last(seq):

   if(len(seq) == 0):

       return ()

   elif(len(seq) == 1):

       return (seq[0],)

   else:

       return (seq[0], seq[len(seq)-1])

#Testing

print(first_last([]))

print(first_last([1]))

print(first_last([1,2,3,4,5]))

# Output

( )

( 1 , )

( 1 , 5 )

5 0
3 years ago
How to make logo black and white in paint?
Pie
Change the color to black and white
7 0
3 years ago
Which option is an example of a Boolean operator?<br> O A. HTML<br> O B. <br> C. SEO<br> D. NOT
gayaneshka [121]

Answer:

D

Explanation:

Boolean Operators are simple words (AND, OR, NOT or AND NOT) used as conjunctions to combine or exclude keywords in a search, resulting in more focused and productive results. ... Proximity Operators (with, near and others) can also help you in searching. See Using Proximity Operators for more details and examples.

8 0
3 years ago
This is your chance to become the instructor. After learning the looping and input validation concepts, create a problem to give
enot [183]

Answer:

See Explaination

Explanation:

The Problem information is as follows:

The input: A data file containing the bank account information.Accounts are of different

types (like Savings Account, Checking Accounts).

The Output: Report on Number of Savings Account, Number of Checking accounts and their

total balances, avregae balance, maximum and minimum balance etc

Processing:

Read the file data

Consider valid account data

Separate different accounts

Calculate the sum of their balances

Calculate the average balnace for each type of account

Display the information

Solution:

1.The application should be able to read the csv file.

2.All the error checking should be done as per defined rules

3.The report should be generated in the defined format

4.Data display precisions need to be followed.

5.Interactive errors should be reported with proper messages

6.Integrity of the data should be maintaied while saving the data.

7. Calculation of the averageAccountBalance = (Sum of all the balances of a particular type of account)/(number of that type of account)

8. TotalAccountBalance = Sum of all the balances of each type of account.

9. To find maximum start with a default value and then traverse all the accounts and update the maximum value as per the comparison results

and same for minimum.

Input Validation:

1.Check for the filename (maximum length is 10 chars besides the csv extension)

2.account number (12 digits, first three entries are alphabets)

3.Name (Only alphabets are allowed)

4.Phone Number (7 digits must follow the format xxx-xxx-x)

pesudoCode:

Input filename

open the file

declare accounts[] array

Read the data in accounts and update numOfAccounts

declare numOfAccounts, numOfSavingActs, numOfCheckingActs, totalBalanceSavings, totalBalanceChecking, averageBalanceChecking

averageBalanceSavings, maximumSaavings, minimumSavings, maximumChecking, minimumChecking

for i = 1 to n:

if (Validate(account[i])):

if account[i].type == "Savings":

numOfSavingActs++

totalBalanceSavings = totalBalanceSavings + account[i].balance

if account[i].balance > maximumSavings:

maximumSavings = account[i].balance

if account[i].balance < minimumSavings:

minimumSavings = account[i].balance

if account[i].type == "Checkings":

numOfSavingActs++

totalBalanceSavings = totalBalanceSavings + account[i].balance

if account[i].balance > maximumSavings:

maximumSavings = account[i].balance

if account[i].balance < minimumSavings:

minimumSavings = account[i].balance

Display(Data)

4 0
3 years ago
The true or false questions.
DIA [1.3K]

Answer:

true

Explanation:

The command:

find -empty -type f -exec rm { } \;

carries out the following steps.

1) Finds all the empty files in the current directory and its subdirectories.

2) For each of the identified files, it executes the command specified as the parameter to exec option,namely, rm <filename>.

So effectively it removes all empty files in the directory tree starting at the current directory.  

7 0
3 years ago
Other questions:
  • Help asap. 10 points.
    8·2 answers
  • Please help with this
    5·2 answers
  • You have a folder on your Windows desktop system that you would like to share with members of your development team. Users need
    13·1 answer
  • What is the absolute pathname of the YUM configuration file? REMEMBER: An absolute pathname begins with a forward slash
    12·1 answer
  • If you specify a user without specifying a hostname, mysql will
    13·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • Which of these statements about tags is false?
    12·1 answer
  • In fnaf who´s spring trap in fnaf 3 and who are the five victim names that he murdered and lure them into the back room.
    10·2 answers
  • Explain set associative mapping<br>​
    10·1 answer
  • 70 point Brainlist to best answer
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!