|
|
On the SQL tab you can
modify SQL query manually. All changes on this tab automatically
transfer to the Query Designer.
Note: if you
modify default SQL query, make sure that key column(s) are
included. This is required to provide edit/delete
functionality.
To switch between tables use Tables list panel on the left.
What is
supported
SQL query:
SELECT
carsmodels.id,
carsmodels.model,
carsmodels.make
FROM carsmodels
INNER JOIN carsmake ON carsmodels.make = carsmake.make
|
Note: it's
recommended to use aliases for fields from joined tables to avoid
confusion when two fields from different tables have the same
name.
SQL query:
SELECT
category,
color,
Date Listed,
descr,
EPACity,
EPAHighway,
features,
UserID,
YearOfMake,
zipcode,
Price*0.1 AS Discount
FROM carscars
|
SQL query:
SELECT *
FROM carscars
WHERE YearOfMake =2004
|
For
more complicated queries wrap
condition by brackets:
SELECT *
FROM carscars
WHERE ( YearOfMake =2004 OR YearOfMake =2005 )
|
SQL query:
SELECT
Make,
Model,
AVG (YearOfMake)
FROM carscars
GROUP BY id, Make, Model
ORDER BY Make
|
What is
not supported
|