Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3786044
D3183.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3183.diff
View Options
diff --git a/sql/db-A/zed/hypership-tower-art-locations-free.sql b/sql/db-A/zed/hypership-tower-art-locations-free.sql
new file mode 100644
--- /dev/null
+++ b/sql/db-A/zed/hypership-tower-art-locations-free.sql
@@ -0,0 +1,35 @@
+-- Zed
+-- Where can we put artwork?
+
+USE zed_prod;
+
+SET @max_tower_floor = 100;
+
+-- Counters T and C for T1C1..T100C6
+WITH RECURSIVE counter_tower AS (
+ SELECT 1 AS floor_counter, 1 AS corridor
+ UNION ALL
+ SELECT
+ (CASE
+ WHEN corridor < 6 THEN floor_counter
+ WHEN corridor = 6 THEN floor_counter + 1
+ END) AS floor_counter,
+ (CASE
+ WHEN corridor < 6 THEN corridor + 1
+ WHEN corridor = 6 THEN 1
+ END) AS corridor
+ FROM counter_tower
+ WHERE floor_counter < @max_tower_floor
+)
+
+SELECT
+ location_local
+FROM
+ (SELECT CONCAT("T", floor_counter, "C", corridor) as location_local FROM counter_tower) as locations
+WHERE
+ location_local NOT IN (
+ SELECT DISTINCT location_local
+ FROM content_locations
+ WHERE location_global = "B00001001" -- Hypership tower
+ )
+;
diff --git a/sql/db-A/zed/hypership-tower-art-locations.sql b/sql/db-A/zed/hypership-tower-art-locations.sql
new file mode 100644
--- /dev/null
+++ b/sql/db-A/zed/hypership-tower-art-locations.sql
@@ -0,0 +1,12 @@
+-- Zed
+-- Where do we have artwork?
+
+USE zed_prod;
+
+SELECT
+ DISTINCT location_local
+FROM
+ content_locations
+WHERE
+ location_global = "B00001001" -- Hypership tower
+ORDER BY location_local ASC;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 12:22 (21 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2265103
Default Alt Text
D3183.diff (1 KB)
Attached To
Mode
D3183: Publish SQL queries for Zed
Attached
Detach File
Event Timeline
Log In to Comment