You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectt2.fld1,t2.companynr,fld3,period_from t3,t2 where (t2.fld1=38208ort2.fld1=38008) andt2.fld1=t3.t2nrandperiod_>=1008andperiod_<=1009;
1593
+
selectt2.fld1,t2.companynr,fld3,periodfrom t3,t2 where (t2.fld1=38208ort2.fld1=38008) andt2.fld1=t3.t2nrandperiod>=1008andperiod<=1009;
1594
1594
1595
-
selectt2.fld1,t2.companynr,fld3,period_from t3,t2 where (t3.t2nr=38208ort3.t2nr=38008) andt2.fld1=t3.t2nrandperiod_>=1008andperiod_<=1009;
1595
+
selectt2.fld1,t2.companynr,fld3,periodfrom t3,t2 where (t3.t2nr=38208ort3.t2nr=38008) andt2.fld1=t3.t2nrandperiod>=1008andperiod<=1009;
1596
1596
1597
1597
#
1598
1598
# Test of many parenthesis levels
1599
1599
#
1600
1600
1601
-
selectperiod_from t1 where (((period_>0) orperiod_<10000or (period_=1900)) and (period_=1900andperiod_<=1901) or (period_=1903and (period_=1903)) andperiod_>=1902) or ((period_=1904orperiod_=1905) or (period_=1906orperiod_>1907)) or (period_=1908andperiod_=1909);
1602
-
selectperiod_from t1 where ((period_>0andperiod_<1) or (((period_>0andperiod_<100) and (period_>10)) or (period_>10)) or (period_>0and (period_>5orperiod_>6)));
1601
+
selectperiodfrom t1 where (((period>0) orperiod<10000or (period=1900)) and (period=1900andperiod<=1901) or (period=1903and (period=1903)) andperiod>=1902) or ((period=1904orperiod=1905) or (period=1906orperiod>1907)) or (period=1908andperiod=1909);
1602
+
selectperiodfrom t1 where ((period>0andperiod<1) or (((period>0andperiod<100) and (period>10)) or (period>10)) or (period>0and (period>5orperiod>6)));
1603
1603
1604
1604
selecta.fld1from t2 as a,t2 b where ((a.fld1=250501anda.fld1=b.fld1) ora.fld1=250502ora.fld1=250503or (a.fld1=250505anda.fld1<=b.fld1andb.fld1>=a.fld1)) anda.fld1=b.fld1;
1605
1605
@@ -1657,7 +1657,7 @@ select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 grou
1657
1657
# Calculation with group functions
1658
1658
#
1659
1659
1660
-
selectsum(Period_)/count(*) from t1;
1660
+
selectsum(Period)/count(*) from t1;
1661
1661
select companynr,count(price) as"count",sum(price) as"sum" ,abs(sum(price)/count(price)-avg(price)) as"diff",(0+count(price))*companynr as func from t3 group by companynr;
1662
1662
select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg >70000000order by avg;
1663
1663
@@ -1747,13 +1747,13 @@ select max(t2nr) from t3 where price=983543950;
1747
1747
# Test of alias
1748
1748
#
1749
1749
1750
-
selectt1.period_from t3 = t1 limit1;
1751
-
selectt1.period_from t1 as t1 limit1;
1752
-
selectt1.period_as"Nuvarande period_"from t1 as t1 limit1;
1753
-
selectperiod_as ok_period from t1 limit1;
1754
-
selectperiod_as ok_period from t1 group by ok_period limit1;
1750
+
selectt1.periodfrom t3 = t1 limit1;
1751
+
selectt1.periodfrom t1 as t1 limit1;
1752
+
selectt1.periodas"Nuvarande period"from t1 as t1 limit1;
1753
+
selectperiodas ok_period from t1 limit1;
1754
+
selectperiodas ok_period from t1 group by ok_period limit1;
1755
1755
select1+1as summa from t1 group by summa limit1;
1756
-
selectperiod_as"Nuvarande period_"from t1 group by"Nuvarande period_"limit1;
1756
+
selectperiodas"Nuvarande period"from t1 group by"Nuvarande period"limit1;
0 commit comments