You have a Fabric warehouse that contains a table named Staging.Sales. Staging.Sales contains the following columns.You need to write a T-SQL query that will return data for the year 2023 that displays ProductID and ProductName and has a summarized Amount that is higher than 10,000.Which query should you use?
Answer(s): A
SELECT - GROUP BY- Transact-SQLSELECT statement clause that divides the query result into groups of rows, usually by performing one or more aggregations on each group. The SELECT statement returns one row per group.NOTE: General RemarksHow GROUP BY interacts with the SELECT statement SELECT list:Vector aggregates. If aggregate functions are included in the SELECT list, GROUP BY calculates a summary value for each group. These are known as vector aggregates.Distinct aggregates. The aggregates AVG (DISTINCT column_name), COUNT (DISTINCT column_name), and SUM (DISTINCT column_name) are supported with ROLLUP, CUBE, and GROUPING SETS.WHERE clause:SQL removes Rows that do not meet the conditions in the WHERE clause before any grouping operation is performed.*-> HAVING clause:SQL uses the having clause to filter groups in the result set.Incorrect:Not B: Put the 2023 filtering in the WHERE clause, not in the HAVING clause. Not C: Need a GROUP BY clause-Not D: Can't use the alias TOTALAMOUNT in the HAVING clause.
https://learn.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql
HOTSPOT (Drag and Drop is not supported)You have a data warehouse that contains a table named Stage.Customers. Stage.Customers contains all the customer record updates from a customer relationship management (CRM) system. There can be multiple updates per customer.You need to write a T-SQL query that will return the customer ID, name, postal code, and the last updated time of the most recent row for each customer ID.How should you complete the code? To answer, select the appropriate options in the answer area.NOTE: Each correct selection is worth one point.Hot Area:
Transact SQL LAST_Value Transact NTILEBox 1: ROW_NUMBER() ()* ROW_NUMBER()Numbers the output of a result set. More specifically, returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.Syntax: ROW_NUMBER ( )OVER ( [ PARTITION BY value_expression , ... [ n ] ] order_by_clause )Incorrect:* LAST_VALUE()Incorrect syntax.NOTE: LAST_VALUE (Transact-SQL)Returns the last value in an ordered set of values.SyntaxLAST_VALUE ( [ scalar_expression ] ) [ IGNORE NULLS | RESPECT NULLS ] OVER ( [ partition_by_clause ] order_by_clause [ rows_range_clause ] )LAST_Value()* NTILE()Incorrect syntax used.NOTE: NTILE (Transact-SQL)Distributes the rows in an ordered partition into a specified number of groups. The groups are numbered, starting at one. For each row, NTILE returns the number of the group to which the row belongs.NTILE (integer_expression) OVER ( [ <partition_by_clause> ] < order_by_clause > ) Box 2: WHERE X = 1
https://learn.microsoft.com/en-us/sql/t-sql/functions/row-number-transact-sql https://learn.microsoft.com/en-us/sql/t-sql/functions/ntile-transact-sql https://learn.microsoft.com/en-us/sql/t-sql/functions/last-value-transact-sql
You have a Fabric tenant that contains a warehouse.You use a dataflow to load a new dataset from OneLake to the warehouse.You need to add a PowerQuery step to identify the maximum values for the numeric columns. Which function should you include in the step?
Answer(s): D
You have a Fabric tenant that contains a Microsoft Power BI report named Report1. Report1 includes a Python visual.Data displayed by the visual is grouped automatically and duplicate rows are NOT displayed. You need all rows to appear in the visual.What should you do?
Answer(s): C
You have a Fabric workspace named Workspace1 that contains a dataflow named Dataflow1. Dataflow1 has a query that returns 2,000 rows.You view the query in Power Query as shown in the following exhibit.What can you identify about the pickupLongitude column?
Count is 1000. Distinct count is 935.There are duplicate values.NOTE: The Count Distinct aggregate function in Power BI is useful for counting the number of unique values in a column of a dataset. It provides fast, accurate, and efficient results when you need to calculate the number of unique items in a data set, such as the number of unique customers, products, or transactions.Incorrect:Not B: Null count is 0.Not D: Unique count is 871.
https://www.onlc.com/blog/what-is-count-distinct-in-power-bi
Post your Comments and Discuss Microsoft DP-600 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the DP-600 content, but please register or login to continue.