minor changes to frontend

This commit is contained in:
Pedro 2014-11-17 22:13:29 +01:00
parent 070ea2de28
commit ec924ab500
4 changed files with 26 additions and 18 deletions

View File

@ -31,7 +31,7 @@
<!-- Input -->
<div class="row">
<div class="col-sm-12">
<textarea id="queryInput" class="form-control" style="height: 300px; resize: none;">SELECT * FROM students;</textarea>
<textarea id="queryInput" class="form-control" style="height: 300px; resize: none;" placeholder="Enter your SQL query here..."></textarea>
</div>
</div>

View File

@ -1,2 +1,10 @@
#!/bin/sh
python -m SimpleHTTPServer 10101
# Default Port
PORT="10101"
if [ $# -gt 0 ]; then
PORT=$1
fi
python -m SimpleHTTPServer ${PORT}

View File

@ -3,13 +3,15 @@ CREATE TABLE IF NOT EXISTS students FROM TBL FILE 'test/students.tbl';
CREATE TABLE IF NOT EXISTS test FROM TBL FILE 'test/lin_xxs.tbl';
CREATE TABLE IF NOT EXISTS companies FROM TBL FILE 'test/tables/companies.tbl';
CREATE TABLE IF NOT EXISTS employees FROM TBL FILE 'test/tables/employees.tbl';
# SELECT (1)
SELECT * FROM students;
# SELECT (2)
# SELECT
SELECT * FROM students WHERE grade <= 2.0;
# SUB-SELECT
SELECT name, city, grade FROM (SELECT * FROM students WHERE city = 'Potsdam') t1 WHERE grade <= 1.5 OR grade >= 3.5;
# GROUP
SELECT city, AVG(grade) AS average|, MIN(grade) AS best, MAX(grade) AS worst FROM students GROUP BY city;
# UNION
SELECT * FROM students WHERE grade = 1.3 UNION SELECT * FROM students WHERE grade = 3.7;
# JOIN
SELECT * FROM companies JOIN employees ON company_id = employee_company_id
# SIMPLE JOIN
SELECT * FROM companies JOIN employees ON company_id = employee_company_id;
# HASH JOIN
SELECT * FROM companies HASH JOIN employees ON company_id = employee_company_id;

View File

@ -7,19 +7,17 @@ div {
margin: auto;
}
.content {
width: 90%;
margin: auto;
margin-top: 10px;
}
button {
margin-left: 1px;
margin-right: 1px;
}
/*
#resultTable td {
border: 1px solid #333;
padding: 10px;
}*/
table {
font-size: 14px;
}
.content {
width: 90%;
margin: auto;
margin-top: 10px;
}