prepare dashboard
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user