Question: I need ans asap please: Write an SQL SELECT statement that decomposes the following SQL SELECT statement. The decomposed statement should show the row results
I need ans asap please:





Write an SQL SELECT statement that decomposes the following SQL SELECT statement. The decomposed statement should show the row results before execution of the GROUP BY part of the following statement. SELECT AssetType, TrdStatus, SUM(TrdQty TrdPrice) AS SumTrdAmt FROM Asset, Trade WHERE Asset.Assetld = Trade.Assetid AND TrdDate BETWEEN '2020-01-01' AND '2020-12-31 AND Trd Type = 'sell' GROUP BY AssetType, TrdStatus HAVING SUM(Trd Qty) >= 1000; In a SELECT statement, what happens when a row summary condition such as COUNT(*) > 10 is placed in the WHERE clause of a PostgreSQL SELECT statement? Syntax error The PostgreSQL SQL compiler rewrites the statement moving the row conditions to the WHERE clause. O Possibly faster execution because all row conditions are tested in processing of the WHERE clause. The statement produces an incorrect result because row conditions cannot be tested in the HAVING clause. For the column Charge.ChgStartTime, choose the appropriate PostgreSQL data type given the column should store both date and time such as 2020-02-10 8:30AM. O DATE O TIMESTAMP O TIME O VARCHAR(20) Choose the appropriate conditions in the WHERE clause to retrieve trades with either a) complete status and buy type or b) pending status and sell type. The trade date should be in February 2020 regardless of type and status of the trades. TrdDate BETWEEN 2/1/2020 AND 2/29/2020 OR TrdType = 'Buy' AND TrdStatus = 'complete' OR TrdType = 'buy' AND TrdStatus = 'pending' AND TrdType = 'selli TrdDate BETWEEN 2/1/2020 AND 2/29/2020 OR (TrdType = 'Buy' AND TrdStatus = 'complete' OR TrdType = 'buy') AND (TrdStatus = 'pending' AND TrdType = 'sell) TrdDate BETWEEN 2/1/2020 AND 2/29/2020 AND ((Trd Type = 'Buy' AND TrdStatus = 'complete') OR (TrdType = 'buy' AND TrdStatus = 'pending' AND TrdType = 'sell')) TrdDate BETWEEN 2/1/2020 AND 2/29/2020 AND TrdType = 'Buy' AND TrdStatus = 'complete' OR TrdType = 'buy' AND TrdStatus = 'pending' AND TrdType = 'sell' What happens when conditions involving aggregate functions (for example, COUNT(*) > 0) are placed in the WHERE clause of a PostgreSQL SQL SELECT statement? Possibly faster execution because some group conditions are tested in the processing of the WHERE clause. Syntax error Possibly slower execution because some group conditions are tested in the WHERE clause. The statement produces an incorrect result because group conditions cannot be reliably tested in the WHERE clause. Write an SQL SELECT statement that decomposes the following SQL SELECT statement. The decomposed statement should show the row results before execution of the GROUP BY part of the following statement. SELECT AssetType, TrdStatus, SUM(TrdQty TrdPrice) AS SumTrdAmt FROM Asset, Trade WHERE Asset.Assetld = Trade.Assetid AND TrdDate BETWEEN '2020-01-01' AND '2020-12-31 AND Trd Type = 'sell' GROUP BY AssetType, TrdStatus HAVING SUM(Trd Qty) >= 1000; In a SELECT statement, what happens when a row summary condition such as COUNT(*) > 10 is placed in the WHERE clause of a PostgreSQL SELECT statement? Syntax error The PostgreSQL SQL compiler rewrites the statement moving the row conditions to the WHERE clause. O Possibly faster execution because all row conditions are tested in processing of the WHERE clause. The statement produces an incorrect result because row conditions cannot be tested in the HAVING clause. For the column Charge.ChgStartTime, choose the appropriate PostgreSQL data type given the column should store both date and time such as 2020-02-10 8:30AM. O DATE O TIMESTAMP O TIME O VARCHAR(20) Choose the appropriate conditions in the WHERE clause to retrieve trades with either a) complete status and buy type or b) pending status and sell type. The trade date should be in February 2020 regardless of type and status of the trades. TrdDate BETWEEN 2/1/2020 AND 2/29/2020 OR TrdType = 'Buy' AND TrdStatus = 'complete' OR TrdType = 'buy' AND TrdStatus = 'pending' AND TrdType = 'selli TrdDate BETWEEN 2/1/2020 AND 2/29/2020 OR (TrdType = 'Buy' AND TrdStatus = 'complete' OR TrdType = 'buy') AND (TrdStatus = 'pending' AND TrdType = 'sell) TrdDate BETWEEN 2/1/2020 AND 2/29/2020 AND ((Trd Type = 'Buy' AND TrdStatus = 'complete') OR (TrdType = 'buy' AND TrdStatus = 'pending' AND TrdType = 'sell')) TrdDate BETWEEN 2/1/2020 AND 2/29/2020 AND TrdType = 'Buy' AND TrdStatus = 'complete' OR TrdType = 'buy' AND TrdStatus = 'pending' AND TrdType = 'sell' What happens when conditions involving aggregate functions (for example, COUNT(*) > 0) are placed in the WHERE clause of a PostgreSQL SQL SELECT statement? Possibly faster execution because some group conditions are tested in the processing of the WHERE clause. Syntax error Possibly slower execution because some group conditions are tested in the WHERE clause. The statement produces an incorrect result because group conditions cannot be reliably tested in the WHERE clause
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
