Match (C:Cell) <- [*1..2] – (p:Cell) return c,p
-
-
Save jjb/06e814a356b0f66a7c5a to your computer and use it in GitHub Desktop.
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
SELECT dbo.CellInRange.cellID, dbo.precedents_range.cellID as PrecID | |
FROM dbo.Cells as CellsInRange | |
INNER JOIN | |
dbo.precedents_range ON CellsInRange.Id = dbo.precedents_range.cellID | |
INNER JOIN | |
dbo.Range ON dbo.precedents_range.rangeID = dbo.Range.Id | |
INER JOIN | |
Dbo.CellInRange ON dbo.Range.Id = dbo.CellinRange.rangeID | |
UNION | |
SELECT dbo.Cells.Id as CellId, dbo.precedents.precId as PrecId | |
FROM dbo.Cells | |
INNER JOIN | |
dbo.precedents ON dbo.Cells.Id = dbo.precedents.cellId | |
INNER JOIN | |
Dbo.Cells as PrecedentsCells ON dbo.precedents.precId = precedentsCells.Id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment