Questions tagged [cross-join]

For any question involving a CROSS JOIN, i.e. combining every SELECT-ed field from one table with every SELECT-ed field from another.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
50 views

Large Cartesian Product

I just spoke with someone at straightpaths.com who suggested I try this forum. I'm creating a "paths to victory" solution for a series of games where each game has 8 players who will finish ...
user avatar
0 votes
0 answers
34 views

Is there a cross join in these CTEs?

I have a query that is constructed from several CTEs (in order to organize the query). I constructed it in my SQL workbench and was happy with the test results on a smaller dataset, so I converted it ...
user avatar
  • 171
2 votes
1 answer
96 views

How do I create a SQL loop that generates future dates based on different frequencies and intervals for each item until a specified end date?

I have a data set that appears like this: next_generation_date procedure interval frequency 2021-01-17 00:00:00.000 Clean Restroom 1 day 2021-01-17 00:00:00.000 Vacuum 2 week 2021-02-01 00:00:00....
user avatar
1 vote
1 answer
31 views

Pairing Query Store Read/Write Status with Enabled Status

I am able to find if Query Store is enabled: SELECT name, is_query_store_on from sys.databases I am able to query a specific database to determine the Query Store Read/Write Status: SELECT ...
user avatar
0 votes
2 answers
329 views

Is there such a thing as a LEFT CROSS JOIN?

Is there a way to do what I want to call a "LEFT CROSS JOIN"? I.e., is there a way to specify a CROSS JOIN ON, but return at least one row in the result for every row in the left, using ...
user avatar
0 votes
1 answer
49 views

Add a list of names to a generated series

I generated a date series this way: SELECT generate_series(date '2020-01-01', date '2021-01-21', '1 day'); Additionally I have a list with name (Max Meyer, Anna Smith, Peter Gardner). How could I add ...
user avatar
  • 1