diff options
author | Logan Hunt <loganjh@amazon.com> | 2022-05-24 09:57:15 -0700 |
---|---|---|
committer | Logan Hunt <loganjh@amazon.com> | 2022-05-24 09:57:15 -0700 |
commit | 3db9a2eb7a7d14ce935f5902b0c21ce4fd5eb729 (patch) | |
tree | f618b9a6342b8d30c39454e9cf7b3cabefc04db4 /database/category.lisp | |
download | lispruns-3db9a2eb7a7d14ce935f5902b0c21ce4fd5eb729.tar.gz lispruns-3db9a2eb7a7d14ce935f5902b0c21ce4fd5eb729.zip |
None of the original commit messages would actually help anyone
Diffstat (limited to 'database/category.lisp')
-rw-r--r-- | database/category.lisp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/database/category.lisp b/database/category.lisp new file mode 100644 index 0000000..4416331 --- /dev/null +++ b/database/category.lisp @@ -0,0 +1,19 @@ +(mito:deftable category () + ((name :col-type (:varchar 128)) + (percentage :col-type (:varchar 128))) + (:record-timestamps nil) + (:conc-name category-)) + +(mito:deftable category-split () + ((name :col-type (:varchar 128)) + (category :col-type category)) + (:record-timestamps nil) + (:conc-name category-split-)) + +(defun category-splits (category) + (mito:select-dao 'category-split + (sxql:where (:= :category category)) + ;; Assumption that split categories are entered in the correct order by id + (sxql:order-by :id))) + +;; select *, sum(julianday(end_time)-julianday(start_time))*24*60*60 as total_time from run_split group by run_id order by total_time; |