Created
September 13, 2024 21:13
-
-
Save danield137/ec99165ec0f0512e5813c0c5fcf9b9fe to your computer and use it in GitHub Desktop.
The KQL equivalent of the SQL Server graph example (https://learn.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-sample?view=sql-server-ver16)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.create table Person (Id: int, name:string) | |
.ingest inline into table Person <| | |
1, John | |
2, Mary | |
3, Alice | |
4, Jacob | |
5, Julie | |
.create table Restaurant (Id: int, name:string, city:string) | |
.ingest inline into table Restaurant <| | |
1, Taco Dell,Bellevue | |
2, Ginger and Spice,Seattle | |
3, Noodle Land, Redmond | |
.create table City (Id:int, name:string, state: string) | |
.ingest inline into table City <| | |
1,Bellevue,WA | |
2,Seattle,WA | |
3,Redmond,WA | |
.create table Likes (Who: int, What: int, HowMuch:int) | |
.ingest inline into table Likes <| | |
1,1,9 | |
2,2,9 | |
3,3,9 | |
4,3,9 | |
5,3,9 | |
.create table LivesIn (Who: int, Where: int) | |
.ingest inline into table LivesIn <| | |
1,1 | |
2,2 | |
3,3 | |
4,3 | |
5,1 | |
.create table LocatedIn (What:int, Where:int) | |
.ingest inline into table LocatedIn <| | |
1,1 | |
2,2 | |
3,3 | |
.create table FriendOf (A:int, B:int) | |
.ingest inline into table FriendOf <| | |
1,2 | |
2,3 | |
3,1 | |
4,2 | |
5,4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment