How to Select Data from Table by Using Kusto Query | Kusto Query Language Tutorial (KQL)

Topic: How to Select Data from Table by Using Kusto Query.  

How to Select Data from Table by using Kusto Query | Kusto Query Language Tutorial (KQL) Kusto Query Language is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, create statistical modeling, and more. The query uses schema entities that are organized in a hierarchy similar to SQL's: databases, tables, and columns. A Kusto query is a read-only request to process data and return results. The request is stated in plain text, using a data-flow model that is easy to read, author, and automate. Kusto queries are made of one or more query statements.  
 .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  
 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  
 4,John,Rivers,Laptop,5,2400,2014-03-09,Jersey City,NJ,USA,North America  
 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  
 //Select everything from Table  
 //Provide the list of Columns  
 | project id, SalePersonFName, SalePersonLName, ProductName, ItemsSold, SoldPrice, SoldDate, City, State, Country, Region  
 //Column Name as New Column Name  
 | project CustomerId=id,FName=SalePersonFName  
 //How to Concate two Columns  
 | project FullName=strcat(SalePersonFName ,"  ", SalePersonLName)  
 //Adding Constant Value for a Column  
 | project SalePersonFName,DerivedColumn='Test',RegionId=6,CurrentDate=now()  
 //Top N Rows -- You can use Take or Limit  
 | take 5  
 //Top N row with Order by   
 | order by id asc   
 | limit 5  

Video Demo: How to Select Data from Table by Using Kusto Query 

1 comment:

  1. I know an organization who have private investigators for hire who can help you get into your spouse’s phones,emails remotely from your phone they can also help you with your
    * credit score
    * clearing of criminal record
    *increasing of school grades etc
    You can confirm for yourself from their email or website so you can also give your testimony
    Whatsapp No: +14106350697