                                   from   products
                                   order  by name;"))
 
+(defn read-product-id
+    [product-name]
+    (:id (first (jdbc/query db-spec/data-db ["select id
+                                              from products
+                                              where name=?" product-name]))))
+
 (defn read-repo-list
     [product-id]
     (jdbc/query db-spec/data-db ["select id, name, url
                                   from   repos
-                                  where  product=? order by id;" product-id]))
+                                  where  product=? order by name;" product-id]))
 
 (defn read-commit-id
     [db product repo sha]

                                 from commits
                                 where date between '2015-01-01' and '2015-12-31'
                                 group by author order by author"]))

(defn read-stat-per-weeks-from-db
    [first-day last-day]

                                :insertions insertions
                                :deletions deletions}))

(defn read-author-names
    []
    (jdbc/query db-spec/data-db
                               ["select author
                                 from commits
                                 where date between '2015-01-01' and '2015-12-31'
                                 group by author order by author"]))

(defn read-authors
