]> git.ardis.lu - sheets-db/commitdiff
Trim <textarea> whitespace
authorArdis Lu <ardisglu@gmail.com>
Tue, 15 Mar 2022 02:50:03 +0000 (19:50 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 15 Mar 2022 02:50:03 +0000 (19:50 -0700)
demo/index.html

index 79fb933034a337dd72ed73bce7195a73a125081f..a244a0a39ef2b07cad173831ea2ecd6bed73ec00 100644 (file)
   <main>
     <label for="editor">Enter a SQL query:</label>
     <textarea id="editor" name="editor">
-    SELECT
-      users.first_name
-      , users.last_name
-      , STRFTIME('%Y-%m-%d', users.birthday) AS BIRTHDAY
-      , transactions.category
-      , SUM(transactions.price) AS TOTAL
-    FROM
-      users
-      INNER JOIN transactions ON users.user_id = transactions.user_id
-    GROUP BY
-      users.user_id
-      , transactions.category
-    ORDER BY
-      TOTAL DESC
-    LIMIT 25
+SELECT
+  users.first_name
+  , users.last_name
+  , STRFTIME('%Y-%m-%d', users.birthday) AS BIRTHDAY
+  , transactions.category
+  , SUM(transactions.price) AS TOTAL
+FROM
+  users
+  INNER JOIN transactions ON users.user_id = transactions.user_id
+GROUP BY
+  users.user_id
+  , transactions.category
+ORDER BY
+  TOTAL DESC
+LIMIT 25
     </textarea>
     <button id="execute">Execute SQL</button>
 
This page took 0.041137 seconds and 4 git commands to generate.