Topic: How to Use Distinct Operator in Kusto to Get Unique Records | Kusto Query Language (KQL)
In this Article, we are going to learn about distinct operator distinct operator produce a table with a distinct combination of the provided columns of the input table. Azure Data Explorer is a fast, fully managed data analytics service for real-time analysis on large volumes of data streaming from applications, websites, IoT devices, and more. Ask questions and iteratively explore data on the fly to improve products, enhance customer experiences, monitor devices, and boost operations. Quickly identify patterns, anomalies, and trends in your data.
// distinct operator : Produces a table with the distinct combination of the provided columns of the input table.
.clear table TotalSale data
.create table TotalSale (
id: int
,SalePersonFName: string
,SalePersonLName : string
,ProductName : string
,ItemsSold : int
,SoldPrice :real
,SoldDate: date
,City : string
,State : string
,Country : string
,Region : string
)
//Insert data
.ingest inline into table TotalSale <|
11,Tamara,Tony,Cell Phone,2,1200,2015-03-03,Frankfurt,Hesse,Germany,Europe
11,Tamara,Tony,Cell Phone,2,1200,2015-03-03,Frankfurt,Hesse,Germany,Europe
9,Petra,Henry,TV,10,5000,2015-04-08,Paris,Île-de-France,France,Europe
3,Christy,Ladson,TV,3,1600,2015-04-02,High Point,NC,USA,North America
7,Chirag,Patel,Cell Phone,5,1500,2015-06-23,AhmadAbad,Gujrat,India,Asia
2,M,Raza,Cell Phone,2,800,2015-07-15,Charlotte,NC,USA,North America
5,Najaf,Ali,Computer,1,300,2015-06-20,Karachi,Sindh,Pakistan,Asia
6,Sukhjeet,Singh,TV,2,900,2015-06-21,ChandiGar,Punjab,India,Asia
4,John,Rivers,Laptop,5,2400,2014-03-09,Jersey City,NJ,USA,North America
8,Aleena,Aman,Laptop,2,800,2015-05-25,Lahore,Punjab,Pakistan,Asia
10,Rita,Roger,Laptop,7,2100,2015-04-11,Paris,Île-de-France,France,Europe
1,Aamir,Shahzad,TV,1,700,2015-07-15,Charlotte,NC,USA,North America
12,aamir,shahzad,TV,1,7000,2015-07-15,Charlotte,NC,USA,North America
id=Null,bisma,Roger,Laptop,7,2100,2015-04-11,Paris,Île-de-France,France,Europe
//Get distinct records for all columns
TotalSale
| distinct *
//distinct for specific columns
TotalSale
| distinct SalePersonFName,SalePersonLName
//how to ignore case senstive data for distinct
TotalSale
| distinct tolower(SalePersonFName),tolower(SalePersonLName)
From arcade adventures to brainteasers, unblocked games 76 has something for every gamer, regardless of skill level
ReplyDeleteHello! I'm hoping to add some excitement to my online leisure time, especially by exploring color prediction games, but I'm struggling to find ones that engage me. Can you recommend any platforms that offer immersive experiences in this genre?
ReplyDelete