Results for "Select"

14 / 184 posts

Added columns in a table by dynamic ways

IF OBJECT_ID('AddedDynamicColumn','P') IS NOT NULL BEGIN DROP PROC AddedDynamicColumn END GO CREATE PROCEDURE AddedDynamicColumn AS BEGIN SELECT ED.empid,E…

database mysql pivot
Mar 19, 2026 5 min read

How to get first date of given date or month.

Get First date of month: SELECT DATEFROMPARTS(YEAR(GETDATE()), MONTH(GETDATE()), 1) AS FirstDayOfCurrentMonth Create function for that IF NOT EXISTS (SELEC…

database mysql pivot
Mar 19, 2026 1 min read

Find column in the whole database in sql server

To find a specific column in the whole database in SQL Server, you can query the information schema views. Here's a query you can use: SELECT table_name, c…

database mysql SQL Server
Mar 19, 2026 1 min read

UNION, UNION All, INTERSECT, EXCEPT used in SQL Server

UNION : The UNION operator is used to combine the result sets of two or more SELECT statements into a single result set. It removes duplicate rows from the…

database EXCEPT INTERSECT
Mar 19, 2026 2 min read

Order by index number in SQL

SELECT empid, lastname FROM HR.Employees ORDER BY 1 DESC --order by first column SELECT empid, lastname FROM HR.Employees ORDER BY 2 DESC --order by second…

comma saparate Indexing mysql
Mar 19, 2026 1 min read

Filtering the data with TOP and OFFSET-FETCH In SQL

TOP: SELECT TOP (5) productid, unitprice FROM Production.Products WHERE categoryid = 1 ORDER BY unitprice DESC; SELECT TOP (5) WITH TIES productid, unitpri…

database mysql OFFSET-FETCH
Mar 19, 2026 3 min read

PaySpark Data manipulation

Select Table into dataframe: df = spark.read.table(tableName="samples.tpch.customer").limit(5) df = spark.table(tableName="samples.tpch.customer").limit(5)…

PySpark
Mar 19, 2026 1 min read

ALLSELECTED Function in Power BI

ALLSELECTED : The ALLSELECTED function in DAX is used to return all the rows in a table, or all the values in a column . This is particularly useful in sce…

Power BI
Mar 19, 2026 1 min read

Split full name into first name and last name in SQL

Split full name into first name and last name : SELECT EmployeeName, CASE WHEN CHARINDEX(' ', EmployeeName) > 0 -- Check if there is a space (indicating…

microsoft programming sql-server
Mar 19, 2026 1 min read

What is the KDD (Knowledge Discovery in Databases)

In today's world, data is everywhere. Businesses, healthcare, banking, and even social media generate vast amounts of data every second. But raw data alone…

Cleaning the Data Data Integration data mining
Mar 19, 2026 3 min read

select() Function in PySpark

In PySpark, select() function is used to select single, multiple, column by index, all columns from the list and the nested columns from a DataFrame, PySpa…

column select Select select function in pyspark
Mar 19, 2026 1 min read

where() & filter() in PySpark

The filter() function in PySpark is used to create a new DataFrame by selecting rows that meet a specified condition or SQL expression. Alternatively, the …

arra_contain endwith Filter
Mar 19, 2026 1 min read

PySpark Built-in Functions

These functions are commonly used with groupBy() , agg() , or select() to compute things like sum, average, max, min, count, etc. PySpark functions come fr…

Aggregate apache spark for beginners big data tutorial
Mar 19, 2026 2 min read

Dynamic CREATE TABLE Script in SQL Server

DECLARE @TableName NVARCHAR(100) = 'Employee'; DECLARE @SQL NVARCHAR(MAX) = ''; DECLARE @PKCols NVARCHAR(MAX) = ''; -- Get Primary Key Column(s) SELECT @PK…

Create Table dynamic Foreign Key Constraints – Automatically Generate Non-Clustered Indexes
Mar 19, 2026 4 min read