Page MenuHomeDevCentral

No OneTemporary

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
index 0000000..4aecfbe
--- /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
index 0000000..4436bfa
--- /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

Mime Type
text/x-diff
Expires
Mon, Nov 25, 06:37 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256071
Default Alt Text
(1 KB)

Event Timeline