Joining tables in KQL
Like SQL, KQL supports joining tables. For those not familiar with SQL, table joins allow us to combine one or more tables in the result set. To demonstrate the use of joins, we will use two sample tables, FamilySport
and FamilyFood
. FamilySport
contains two columns: Name
, which is the name of the family member, and FavoriteSport
, which is their favorite sport. The table definition is shown as follows:
// Create the FamilySport table that will track their favorite sports. .create table FamilySport ( Name: string, FavoriteSport: string )
FamilyFood
also has two columns: Name
, which is the name of the family member, and FavoriteFood
, which is their favorite food. The table definition is as follows:
// Create the FamilyFood table that will track their favorite foods. .create table FamilyFood ( Name: string, FavoriteFood: string )
The complete table definitions...