You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SQL Scripts/order of operations for updating area list.txt
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ DELIMITER $$
12
12
ALTER ALGORITHM=UNDEFINED DEFINER=`djonke`@`%` SQL SECURITY DEFINER VIEW `current` AS (
13
13
SELECT
14
14
`funds`.`month` AS `month`,
15
+
`funds`.`general_fund` AS `general_fund`,
15
16
`funds`.`building_purchase` AS `building_purchase`,
16
-
`funds`.`threed_printer` AS `threed_printer`,
17
17
`funds`.`automotive` AS `automotive`,
18
18
`funds`.`bicycle_repair` AS `bicycle_repair`,
19
19
`funds`.`casting` AS `casting`,
@@ -65,6 +65,7 @@ DELIMITER $$
65
65
ALTER ALGORITHM=UNDEFINED DEFINER=`djonke`@`%` SQL SECURITY DEFINER VIEW `history` AS (
66
66
SELECT
67
67
`funds`.`month` AS `month`,
68
+
`funds`.`general_fund` AS `general_fund`,
68
69
`funds`.`building_purchase` AS `building_purchase`,
69
70
`funds`.`threed_printer` AS `threed_printer`,
70
71
`funds`.`automotive` AS `automotive`,
@@ -119,9 +120,9 @@ DELIMITER $$
119
120
120
121
ALTER ALGORITHM=UNDEFINED DEFINER=`djonke`@`%` SQL SECURITY DEFINER VIEW `ledger` AS
121
122
(
122
-
(SELECT `funds`.`month` AS `time`,'Monthly Funding' AS `reason`,`funds`.`threed_printer` AS `threed_printer`,`funds`.`automotive` AS `automotive`,`funds`.`bicycle_repair` AS `bicycle_repair`,`funds`.`casting` AS `casting`,`funds`.`ceramic` AS `ceramic`,`funds`.`cnc` AS `cnc`,`funds`.`cosplay` AS `cosplay`,`funds`.`craft` AS `craft`,`funds`.`dalek` AS `dalek`,`funds`.`electronic` AS `electronic`,`funds`.`finishing` AS `finishing`,`funds`.`forge` AS `forge`,`funds`.`glass_fusing` AS `glass_fusing`,`funds`.`ham_radio` AS `ham_radio`,`funds`.`hand_tools` AS `hand_tools`,`funds`.`hand_wood_carving` AS `hand_wood_carving`,`funds`.`jewelry` AS `jewelry`,`funds`.`lampworking` AS `lampworking`,`funds`.`laser` AS `laser`,`funds`.`leather` AS `leather`,`funds`.`long_arm` AS `long_arm`,`funds`.`makerfaire` AS `makerfaire`,`funds`.`metal` AS `metal`,`funds`.`models` AS `models`,`funds`.`neon` AS `neon`,`funds`.`paint` AS `paint`,`funds`.`power_wheel` AS `power_wheel`,`funds`.`print` AS `print`,`funds`.`small_engine` AS `small_engine`,`funds`.`soda` AS `soda`,`funds`.`stained_glass` AS `stained_glass`,`funds`.`sublimation` AS `sublimation`,`funds`.`tiger_lily` AS `tiger_lily`,`funds`.`vacuum` AS `vacuum`,`funds`.`welding` AS `welding`,`funds`.`wood` AS `wood` FROM `funds` WHERE DAYOFMONTH(`funds`.`month`) = 1 AND HOUR(`funds`.`month`) = 0 GROUP BY YEAR(`funds`.`month`),MONTH(`funds`.`month`))
123
+
(SELECT `funds`.`month` AS `time`,'Monthly Funding' AS `reason`,`funds`.`general_fund`,`funds`.`threed_printer` AS `threed_printer`,`funds`.`automotive` AS `automotive`,`funds`.`bicycle_repair` AS `bicycle_repair`,`funds`.`casting` AS `casting`,`funds`.`ceramic` AS `ceramic`,`funds`.`cnc` AS `cnc`,`funds`.`cosplay` AS `cosplay`,`funds`.`craft` AS `craft`,`funds`.`dalek` AS `dalek`,`funds`.`electronic` AS `electronic`,`funds`.`finishing` AS `finishing`,`funds`.`forge` AS `forge`,`funds`.`glass_fusing` AS `glass_fusing`,`funds`.`ham_radio` AS `ham_radio`,`funds`.`hand_tools` AS `hand_tools`,`funds`.`hand_wood_carving` AS `hand_wood_carving`,`funds`.`jewelry` AS `jewelry`,`funds`.`lampworking` AS `lampworking`,`funds`.`laser` AS `laser`,`funds`.`leather` AS `leather`,`funds`.`long_arm` AS `long_arm`,`funds`.`makerfaire` AS `makerfaire`,`funds`.`metal` AS `metal`,`funds`.`models` AS `models`,`funds`.`neon` AS `neon`,`funds`.`paint` AS `paint`,`funds`.`power_wheel` AS `power_wheel`,`funds`.`print` AS `print`,`funds`.`small_engine` AS `small_engine`,`funds`.`soda` AS `soda`,`funds`.`stained_glass` AS `stained_glass`,`funds`.`sublimation` AS `sublimation`,`funds`.`tiger_lily` AS `tiger_lily`,`funds`.`vacuum` AS `vacuum`,`funds`.`welding` AS `welding`,`funds`.`wood` AS `wood` FROM `funds` WHERE DAYOFMONTH(`funds`.`month`) = 1 AND HOUR(`funds`.`month`) = 0 GROUP BY YEAR(`funds`.`month`),MONTH(`funds`.`month`))
123
124
UNION
124
-
(SELECT `spending`.`time` AS `time`,`spending`.`reason` AS `reason`,-`spending`.`threed_printer` AS `threed_printer`,-`spending`.`automotive` AS `automotive`,-`spending`.`bicycle_repair` AS `bicycle_repair`,-`spending`.`casting` AS `casting`,-`spending`.`ceramic` AS `ceramic`,-`spending`.`cnc` AS `cnc`,-`spending`.`cosplay` AS `cosplay`,-`spending`.`craft` AS `craft`,-`spending`.`dalek` AS `dalek`,-`spending`.`electronic` AS `electronic`,-`spending`.`finishing` AS `finishing`,-`spending`.`forge` AS `forge`,-`spending`.`glass_fusing` AS `glass_fusing`,-`spending`.`ham_radio` AS `ham_radio`,-`spending`.`hand_tools` AS `hand_tools`,-`spending`.`hand_wood_carving` AS `hand_wood_carving`,-`spending`.`jewelry` AS `jewelry`,-`spending`.`lampworking` AS `lampworking`,-`spending`.`laser` AS `laser`,-`spending`.`leather` AS `leather`,-`spending`.`long_arm` AS `long_arm`,-`spending`.`makerfaire` AS `makerfaire`,-`spending`.`metal` AS `metal`,-`spending`.`models` AS `models`,-`spending`.`neon` AS `neon`,-`spending`.`paint` AS `paint`,-`spending`.`power_wheel` AS `power_wheel`,-`spending`.`print` AS `print`,-`spending`.`small_engine` AS `small_engine`,-`spending`.`soda` AS `soda`,-`spending`.`stained_glass` AS `stained_glass`,-`spending`.`sublimation` AS `sublimation`,-`spending`.`tiger_lily` AS `tiger_lily`,-`spending`.`vacuum` AS `vacuum`,-`spending`.`welding` AS `welding`,-`spending`.`wood` AS `wood` FROM `spending` ORDER BY `time`)
125
+
(SELECT `spending`.`time` AS `time`,`spending`.`reason` AS `reason`,-`spending`.`general_fund`,-`spending`.`threed_printer` AS `threed_printer`,-`spending`.`automotive` AS `automotive`,-`spending`.`bicycle_repair` AS `bicycle_repair`,-`spending`.`casting` AS `casting`,-`spending`.`ceramic` AS `ceramic`,-`spending`.`cnc` AS `cnc`,-`spending`.`cosplay` AS `cosplay`,-`spending`.`craft` AS `craft`,-`spending`.`dalek` AS `dalek`,-`spending`.`electronic` AS `electronic`,-`spending`.`finishing` AS `finishing`,-`spending`.`forge` AS `forge`,-`spending`.`glass_fusing` AS `glass_fusing`,-`spending`.`ham_radio` AS `ham_radio`,-`spending`.`hand_tools` AS `hand_tools`,-`spending`.`hand_wood_carving` AS `hand_wood_carving`,-`spending`.`jewelry` AS `jewelry`,-`spending`.`lampworking` AS `lampworking`,-`spending`.`laser` AS `laser`,-`spending`.`leather` AS `leather`,-`spending`.`long_arm` AS `long_arm`,-`spending`.`makerfaire` AS `makerfaire`,-`spending`.`metal` AS `metal`,-`spending`.`models` AS `models`,-`spending`.`neon` AS `neon`,-`spending`.`paint` AS `paint`,-`spending`.`power_wheel` AS `power_wheel`,-`spending`.`print` AS `print`,-`spending`.`small_engine` AS `small_engine`,-`spending`.`soda` AS `soda`,-`spending`.`stained_glass` AS `stained_glass`,-`spending`.`sublimation` AS `sublimation`,-`spending`.`tiger_lily` AS `tiger_lily`,-`spending`.`vacuum` AS `vacuum`,-`spending`.`welding` AS `welding`,-`spending`.`wood` AS `wood` FROM `spending` ORDER BY `time`)
125
126
)
126
127
$$
127
128
@@ -133,6 +134,7 @@ DELIMITER $$
133
134
ALTER ALGORITHM=UNDEFINED DEFINER=`djonke`@`%` SQL SECURITY DEFINER VIEW `balances` AS
134
135
SELECT
135
136
SUM(`ledger`.`threed_printer`) AS `threed_printer`,
137
+
SUM(`ledger`.`general_fund`) AS `general_fund`,
136
138
SUM(`ledger`.`automotive`) AS `automotive`,
137
139
SUM(`ledger`.`bicycle_repair`) AS `bicycle_repair`,
0 commit comments