Posts

Showing posts from July, 2025

AZURESQLDBA - Migrate an on-premises SQL database to an Azure SQL database using DMA.

Image
  Activity: Migrate an on-premises SQL database to an Azure SQL database using DMA. 1.       Open Microsoft Data Migration Assistant on your computer. From the left ribbon, click the + . 2.       In the resulting window, you will need to set these fields. For project type , Select Assessment For Project Name ,   type AdventureWorks2017 For   Source Server type , Select SQL Server For Target Server Type , Select Azure SQL database       Click create to create a new assessment project.       3.       In the resulting Select repot type window, select the check database compatibility And check feature parity check checkboxes. Click next to continue   4.       In the Connect server window. For server name , provide the SQL server   name For authentication type , Select Windows Authentication clic...

SQL - SQL Server interview questions

  1.⁠ ⁠Find the second highest salary per department using DENSE_RANK. 2.⁠ ⁠Get daily login count trend for the past 15 days. 3.⁠ ⁠Calculate user engagement duration using login/logout timestamps. 4.⁠ ⁠Identify duplicate transactions based on multiple columns. 5.⁠ ⁠Join user and transaction tables while handling NULLs correctly. 6.⁠ ⁠Retrieve top 5 products by revenue in the last 30 days. 7.⁠ ⁠Compute revenue delta between this month and last month. 8.⁠ ⁠Group data by week and count number of active users. 9.⁠ ⁠Perform LEFT JOIN with conditionally filtered rows. 10.⁠ ⁠Use CASE WHEN logic for tiering customers by total spend. 11.⁠ ⁠Check if transaction timestamps are in chronological order. 12.⁠ ⁠Handle missing values using COALESCE or default substitutions. 13.⁠ ⁠Track users with consecutive failed login attempts. 14.⁠ ⁠Find latest status per user using ROW_NUMBER partitioned by user ID. 15.⁠ ⁠Identify products with zero sales in the current quarter. 16.⁠ ⁠Join tables with SCD Type...