Skip to content
Advertisements

Month: March 2019

SQL FIRST_VALUE() and LAST_VALUE()

SQL FIRST_VALUE() and LAST_VALUE()

FIRST_VALUE (), one of our new analytic functions that comes with SQL Server 2012, returns the first value in the sorted data set. LAST_VALUE () returns the last value in […]

SQL LEAD and LAG()

SQL LEAD and LAG()

The “LEAD ()” function returns the next incoming value based on the specified offset value. If no such value exists, it returns “default”. Returns “NULL” if “default” is not entered […]

SQL RANK and DENSE_RANK

The functions RANK and DENSE_RANK are very similar to the ROW_NUMBER function. The difference is the ORDER_BY statement and the connections between these functions. The RANK function returns the same […]

SQL ROW_NUMBER

SQL ROW_NUMBER

Row_Number () is used to create a sort column in the record list that results from a sql query. In short, the rotating list is a function that creates line numbers for sorting. We can also group these line numbers by any field. This function comes with SQL 2005.

Bootstrap Sidebar Menu

Bootstrap Sidebar Menu

CODEPEN Github: https://github.com/Furkan-Gulsen/HTML-CSS-JAVASCRIPT/tree/master/Bootstrap%20Sidebar%20Menu HTML CSS(SASS) JavaScript

sql Grouping Sets

SQL Grouping Sets

What is the Grouping sets statement on sql server? What is the difference with Union? In our queries that contain the Sum function, we combine different grouping schemes using the […]

SQL Cube and Rollup

SQL Cube and Rollup

We can use CUBE and ROLLUP statements together with the GROUP BY statement to create sub-aggregations in our queries that contain the aggregate function. CUBE and ROLLUP are very similar, […]

Production Products Table (SQL)

Production Products Table (SQL)

1 Trek 820 – 2016 9 6 2016 379,99 2 Ritchey Timberwolf Frameset – 2016 5 6 2016 749,99 3 Surly Wednesday Frameset – 2016 8 6 2016 999,99 4 […]

SQL Pivot and Unpivot

SQL Pivot and Unpivot

You can use the PIVOT and UNPIVOT relational operators to change a table-valued expression into another table.

SQL Join Type Examples

SQL Join Type Examples

SQL Join Type Example 1 SQL Join Type Example 2 SQL Join Type Example 3 SQL Join Type Example 4 SQL Join Type Example 5 SQL Join Type Example 6 […]

Bike Stores SQL Database

Bike Stores SQL Database

Summary: in this tutorial, you will learn how to create a new database in SQL Server and execute the script to load the sample database. First, you need to download the […]

Sales Orders Table (SQL)

Sales Orders Table (SQL)

order_id customer_id order_status order_date requiered_date shipped_date store_id staff_id 1 259 4 2016-01-01 2016-01-03 2016-01-03 1 2 2 1212 4 2016-01-01 2016-01-04 2016-01-03 2 6 3 523 4 2016-01-02 2016-01-05 2016-01-03 […]

Sales Customers Table (SQL)

Sales Customers Table (SQL)

1 Debra Burks NULL debra.burks@yahoo.com 9273 Thorne Ave. Orchard Park NY 14127 2 Kasha Todd NULL kasha.todd@yahoo.com 910 Vine Street Campbell CA 95008 3 Tameka Fisher NULL tameka.fisher@aol.com 769C Honey […]