Alias subquery used in calculations, to provide better compatibility with databases such as MonetDB
Alias subquery used in calculations, to provide better compatibility with databases such as MonetDB

Signed-off-by: Michael Koziarski <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@koziarski.com>
Signed-off-by: Tom Ward <96835dd8bfa718bd6447ccc87af89ae1675daeca@popdog.net>
[#796 state:committed]

gcourtemanche/rails,eileencodes/rails,marklocklear/rails,amoody2108/TechForJustice,lcreid/rails,gcourtemanche/rails,illacceptanything/illacceptanything,yalab/rails,felipecvo/rails,starknx/rails,marklocklear/rails,kamipo/rails,betesh/rails,illacceptanything/illacceptanything,fabianoleittes/rails,palkan/rails,travisofthenorth/rails,tjschuck/rails,yalab/rails,assain/rails,Erol/rails,Stellenticket/rails,kaspth/rails,bolek/rails,vassilevsky/rails,vipulnsward/rails,yhirano55/rails,illacceptanything/illacceptanything,printercu/rails,rbhitchcock/rails,illacceptanything/illacceptanything,utilum/rails,gauravtiwari/rails,schuetzm/rails,notapatch/rails,schuetzm/rails,baerjam/rails,mathieujobin/reduced-rails-for-travis,matrinox/rails,kmcphillips/rails,ttanimichi/rails,fabianoleittes/rails,rossta/rails,iainbeeston/rails,yahonda/rails,illacceptanything/illacceptanything,amoody2108/TechForJustice,coreyward/rails,rossta/rails,kachick/rails,repinel/rails,hanystudy/rails,MichaelSp/rails,deraru/rails,bogdanvlviv/rails,joonyou/rails,mathieujobin/reduced-rails-for-travis,pvalena/rails,joonyou/rails,arunagw/rails,schuetzm/rails,esparta/rails,prathamesh-sonpatki/rails,Vasfed/rails,gavingmiller/rails,tijwelch/rails,voray/rails,bradleypriest/rails,mohitnatoo/rails,kirs/rails-1,kirs/rails-1,MichaelSp/rails,mohitnatoo/rails,88rabbit/newRails,kamipo/rails,richseviora/rails,yasslab/railsguides.jp,aditya-kapoor/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,pvalena/rails,matrinox/rails,georgeclaghorn/rails,ngpestelos/rails,baerjam/rails,elfassy/rails,illacceptanything/illacceptanything,deraru/rails,repinel/rails,prathamesh-sonpatki/rails,sealocal/rails,ngpestelos/rails,Edouard-chin/rails,yahonda/rails,Spin42/rails,kddeisz/rails,yasslab/railsguides.jp,maicher/rails,ngpestelos/rails,tgxworld/rails,utilum/rails,riseshia/railsguides.kr,mechanicles/rails,marklocklear/rails,mohitnatoo/rails,BlakeWilliams/rails,deraru/rails,rails/rails,mtsmfm/railstest,betesh/rails,xlymian/rails,Erol/rails,BlakeWilliams/rails,kddeisz/rails,esparta/rails,illacceptanything/illacceptanything,flanger001/rails,shioyama/rails,yawboakye/rails,illacceptanything/illacceptanything,joonyou/rails,tijwelch/rails,EmmaB/rails-1,alecspopa/rails,aditya-kapoor/rails,Envek/rails,jeremy/rails,kirs/rails-1,samphilipd/rails,richseviora/rails,arjes/rails,sealocal/rails,arunagw/rails,joonyou/rails,tjschuck/rails,tjschuck/rails,yahonda/rails,baerjam/rails,yawboakye/rails,bolek/rails,koic/rails,flanger001/rails,alecspopa/rails,illacceptanything/illacceptanything,yhirano55/rails,Edouard-chin/rails,MSP-Greg/rails,MichaelSp/rails,repinel/rails,Spin42/rails,rafaelfranca/omg-rails,vipulnsward/rails,tgxworld/rails,tijwelch/rails,printercu/rails,untidy-hair/rails,mathieujobin/reduced-rails-for-travis,kenta-s/rails,iainbeeston/rails,vassilevsky/rails,gavingmiller/rails,kachick/rails,arunagw/rails,lucasmazza/rails,ledestin/rails,jeremy/rails,mtsmfm/railstest,bradleypriest/rails,kddeisz/rails,rails/rails,bogdanvlviv/rails,koic/rails,kaspth/rails,Vasfed/rails,vassilevsky/rails,yhirano55/rails,riseshia/railsguides.kr,ttanimichi/rails,koic/rails,esparta/rails,elfassy/rails,stefanmb/rails,sergey-alekseev/rails,gfvcastro/rails,untidy-hair/rails,bogdanvlviv/rails,georgeclaghorn/rails,lcreid/rails,ledestin/rails,fabianoleittes/rails,notapatch/rails,mijoharas/rails,Spin42/rails,Stellenticket/rails,starknx/rails,shioyama/rails,mechanicles/rails,kmayer/rails,stefanmb/rails,MSP-Greg/rails,kenta-s/rails,rails/rails,kenta-s/rails,eileencodes/rails,rbhitchcock/rails,notapatch/rails,88rabbit/newRails,mohitnatoo/rails,maicher/rails,rbhitchcock/rails,yalab/rails,gauravtiwari/rails,flanger001/rails,travisofthenorth/rails,arjes/rails,amoody2108/TechForJustice,rafaelfranca/omg-rails,yahonda/rails,schuetzm/rails,illacceptanything/illacceptanything,riseshia/railsguides.kr,sealocal/rails,esparta/rails,voray/rails,Sen-Zhang/rails,Edouard-chin/rails,fabianoleittes/rails,kmayer/rails,gavingmiller/rails,coreyward/rails,sergey-alekseev/rails,mijoharas/rails,yalab/rails,jeremy/rails,Envek/rails,brchristian/rails,flanger001/rails,pvalena/rails,aditya-kapoor/rails,betesh/rails,brchristian/rails,mechanicles/rails,Stellenticket/rails,kachick/rails,shioyama/rails,Erol/rails,bradleypriest/rails,MSP-Greg/rails,kmcphillips/rails,odedniv/rails,Envek/rails,georgeclaghorn/rails,georgeclaghorn/rails,pschambacher/rails,untidy-hair/rails,maicher/rails,xlymian/rails,palkan/rails,samphilipd/rails,kmcphillips/rails,Stellenticket/rails,stefanmb/rails,arjes/rails,lucasmazza/rails,betesh/rails,MSP-Greg/rails,Sen-Zhang/rails,ledestin/rails,kddeisz/rails,vipulnsward/rails,shioyama/rails,assain/rails,tgxworld/rails,baerjam/rails,illacceptanything/illacceptanything,mijoharas/rails,rails/rails,kmcphillips/rails,eileencodes/rails,yasslab/railsguides.jp,iainbeeston/rails,kamipo/rails,BlakeWilliams/rails,BlakeWilliams/rails,mtsmfm/railstest,tgxworld/rails,assain/rails,rafaelfranca/omg-rails,iainbeeston/rails,printercu/rails,illacceptanything/illacceptanything,starknx/rails,vipulnsward/rails,brchristian/rails,travisofthenorth/rails,notapatch/rails,coreyward/rails,printercu/rails,prathamesh-sonpatki/rails,palkan/rails,sergey-alekseev/rails,yawboakye/rails,voray/rails,prathamesh-sonpatki/rails,assain/rails,arunagw/rails,gfvcastro/rails,travisofthenorth/rails,gauravtiwari/rails,utilum/rails,kmayer/rails,xlymian/rails,felipecvo/rails,lucasmazza/rails,gfvcastro/rails,deraru/rails,bogdanvlviv/rails,elfassy/rails,aditya-kapoor/rails,palkan/rails,eileencodes/rails,pschambacher/rails,gfvcastro/rails,matrinox/rails,pschambacher/rails,felipecvo/rails,hanystudy/rails,rossta/rails,hanystudy/rails,mechanicles/rails,mtsmfm/rails,untidy-hair/rails,alecspopa/rails,ttanimichi/rails,88rabbit/newRails,yasslab/railsguides.jp,odedniv/rails,Vasfed/rails,yhirano55/rails,yawboakye/rails,mtsmfm/rails,Envek/rails,pvalena/rails,repinel/rails,kaspth/rails,Edouard-chin/rails,bolek/rails,odedniv/rails,Erol/rails,tjschuck/rails,utilum/rails,EmmaB/rails-1,EmmaB/rails-1,jeremy/rails,illacceptanything/illacceptanything,Sen-Zhang/rails,richseviora/rails,samphilipd/rails,lcreid/rails,Vasfed/rails,gcourtemanche/rails,mtsmfm/rails,riseshia/railsguides.kr,lcreid/rails