SQL Server LAST_VALUE Function


SQL Server LAST_VALUE function is a Analytic function which returns the Last value in an ordered set of values. 

 61 total views

Read More...

SQL Server FIRST_VALUE Function


SQL Server FIRST_VALUE function is a Analytic function which returns the first value in an ordered set of values.

 150 total views

Read More...

SQL Server Composite Key


SQL Server Primary key is used to uniquely identify each rows in the table but sometimes more than one column are used to uniquely identify each rows in the table.

 168 total views

Read More...

Print Prime numbers for any given n number in SQL Server


Print a prime numbers separted by comma for any given number .

  For example, the prime number for 10 , wolud be  2,3,5,7 .

Here is the query:

 136 total views

Read More...

Get the Students who scored higher than 80 Marks


Query to Get the Students who scored higher than 80 Marks ?

 616 total views

Read More...

DATE Function DAX


DATE is a power bi Date and Time Function which returns the date in specified datetime format.

 49 total views

Read More...

SQL Server Dynamic PIVOT


SQL server allows us to transform a row- level data into columnar data using SQL Pivot.

 948 total views

Read More...

SQL CLUSTERED INDEX


SQL Server Clustered index

A clustered index defines the order in which data is physically stored in a table. A table can have only one clustered index because data rows can be only sorted in one order.

 109 total views

Read More...

How to get all tables those are having a primary key


How to get all the tables in database those are having primary key constraints ?

 99 total views

Read More...

COUNT FUNCTION DAX


The COUNT function is a power bi DAX statistica function which counts the number of rows in a table.

It returns a single interger value.

 118 total views

Read More...

SWITCH FUNCTION DAX


SWITCH() Function is a power bi dax logical function which evaluates an expression against a list of values and returns different results depending on the value of an expression.

It returns a scalar value of any type.

 170 total views

Read More...

IF Function DAX


IF function is a Power BI logical function in DAX that checks whether a condition is satisfied, and returns one value in case of TRUE else another value in case of FALSE.

 79 total views

Read More...

SUM() Function DAX


SUM() function is a power bi dax math function that adds up all the values in a single column that you  specify after applying all filters.

 82 total views

Read More...

SUMX Function DAX


SUMX() is a power bi DAX  Math function that returns the sum of an expression evaluated for each row in a table. It returns a decimal number. 

It goes through a table, row by row to complete the evaluation after filter is applied.

Only the numbers in the column are counted. Blanks, logical values, and text are ignored.

It can be used to evaluate expression over multiple columns as it has the ability to work row by row.

 251 total views

Read More...

CALCULATETABLE function DAX


CALCULATETABLE function is a power bi filter function in DAX that evaluates a table expression in a context modified by the given filters. It returns a table of values.

DAX SYNTAX

CALCULATETABLE(,,,…)

 1,557 total views,  1 views today

Read More...

SQL Server TEMPORAL TABLE


SQL Server Temporal tables (system-versioned tables) allow us to track data changes. It was introduced in SQL Server 2016.

It allows SQL Server to maintain and manage the history of the data in the table automatically, So we can get all information about the data that was stored at any specified time rather than just the data that is current.

 497 total views

Read More...

SQL SERVER IF..ELSE


SQL Server IF..ELSE block is a control-of-flow that allows you to execute or skip a statement block based on a specified condition.  

SYNTAX

IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]  

SYNTAX

IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]

 123 total views

Read More...

SQL Server WHILE


SQL Server WHILE loop sets a condition for the repeated execution of an SQL statement or statement block.

 71 total views

Read More...

SQL Server UNPIVOT


SQL Server UNPIVOT allow us to transform columns of a table-valued expression into column values that is rotating columns into rows.

It performs a reverse operation of SQL Server PIVOT.

SYNTAX
SELECT …
FROM …
UNPIVOT (
FOR IN ( ) )

[ … ]

 156 total views

Read More...

SQL Server FOR JSON Clause


SQL Server FOR JSON Clause

SQL Server FOR JSON Clause is used to format query result to JSON format or export data from SQL Server as JSON format. It was introduced in SQL Server 2016 version.

 557 total views

Read More...