|
|
|
|
|
by yummyfajitas
4805 days ago
|
|
Tell me which is more likely to be a sum of profits for years since 2013. Excel: SUM(A100:A112)
SQL: SELECT SUM(yp.profit)
FROM yearly_profitability AS yp
WHERE yp.year > '2012-12-31'::Datetime
(I'm forgetting how to do SQL datetimes, but whatever.)SQL and other programming languages use words to describe the variables. Treating SQL like Excel would be DailyWTF material: CREATE TABLE sheet1(
a INTEGER,
b TIMESTAMP WITH TIME ZONE
)
|
|
Which is easier to understand:
=SUM(profits01_2012:profits12_2012)
Or:
SELECT * FROM dassaddasads WHERE date > 1325394000 AND date < 1356930000
Which is easier to understand?!