prepare dashboard

This commit is contained in:
2024-04-26 22:42:32 -07:00
parent c8f438f616
commit 3e4a2b7322
3 changed files with 52 additions and 2 deletions

View File

@@ -367,3 +367,25 @@
(ffirst (dc/q '[:find ?v :where [?v :vendor/name "CCP Doordash"]] db))))
:separator \tab)
(def taptelis-clients (->> (dc/q '[:find ?c
:where [?u :user/name ?n]
[?u :user/clients ?c]
[?c :client/code ?cc]
[(clojure.string/includes? ?n "Nick Taptelis")]]
(dc/db conn))
(map first)
set))
(clojure.data.csv/write-csv *out* (dc/q '[:find ?v ?cnt
:in $ [?c ...]
:where [?vu :vendor-usage/vendor ?v]
[?vu :vendor-usage/client ?c]
[?vu :vendor-usage/count ?cnt]
[(> ?cnt 0)]]
(dc/db conn)
taptelis-clients)
:separator \tab)