Question :
Why the following statement is erroneous?
SELECT dept_name, ID, avg (salary)
FROM instructor
GROUP BY dept_name;
Option 1: Dept_id should not be used in group by clause
Option 2: Group by clause is not valid in this query
Option 3: Avg(salary) should not be selected
Option 4: None
Correct Answer: Dept_id should not be used in group by clause
Solution : Any property that does not appear in the group by clause must also appear in the select clause in order for it to appear in an aggregate function; otherwise, the query is deemed to be invalid.
Hence the correct answer is option 1.
Related Questions
Question :
Calculate Operating ratio -
|
Particulars |
Amount |
|
Revenue from Operations |
600000 |
|
Gross profit |
20% |
|
Office Expense |
30000 |
|
Selling Expense |
48000 |
Option 1: 80%
Option 2: 95.33%
Option 3: 85%
Option 4: 93%
Question :
From the Following information what will be the amount of asset purchased during the year?
|
Particulars |
Closing |
Opening |
|
Machinery (At cost) |
690000 |
600000 |
|
Accumulated Depreciation |
90000 |
60000 |
Additional information: During the year a machine coating Rs.50,000 with accumulated depreciation Rs.32,000 was sold for Rs.20,000.
Option 1: Rs.1,40,000
Option 2: Rs.1,20,000
Option 3: Rs.1,65,000
Option 4: None of the above
Question :
Calculate Cash Flow From Investing activities From the following information -
|
Particulars |
Amount |
|
Purchase of machine |
300000 |
|
Purchase of goodwill |
150000 |
|
Purchase of Investment |
200000 |
|
Sale of Machine |
85000 |
|
Sale of inveatment |
80000 |
|
Sale of Patents |
90000 |
|
Interest and dividend Received |
60000 |
|
Rent Received |
80000 |
Option 1: Rs.(2,55,000)
Option 2: Rs.6,50,000
Option 3: Rs.3,95,000
Option 4: None of the Above
Question :
On the basis of following information received from a firm, its proprietary ratio will be -
|
Particulars |
Amount |
|
Fixed assets |
330000 |
|
Current assets |
190000 |
|
Preliminary Exp. |
30000 |
|
Equity share capital |
244000 |
|
Prefrence share capital |
170000 |
|
Reserve Fund |
58000 |
Option 1: 80%
Option 2: 85%
Option 3: 70%
Option 4: 90%
Question :
Following is the extract From the balance sheets of Poorva Ltd.
|
Liabilities |
31-03-2022 |
31-03-2021 |
|
Surplus i.e balance in statement of profit and loss |
230000 |
190000 |
|
Proposed Dividend |
60000 |
40000 |
|
Dividend Payable |
9000 |
- |
Net Profit before tax and Extraordinary items will be :
Option 1: Rs.1,90,000
Option 2: Rs.40,000
Option 3: Rs.1,00,000
Option 4: None of the above




