4.1  :  Generic Queries

On this page we document the demo queries available behind the corresponding buttons on the main query page. The following list gives quick links to the corresponding query.

S1

Find the total number of main sequence turning off stars following the criteria of Bell et al. (2010)
select count(*) as n from Lowing2014a..AqA2_stars 
where absmag_g-absmag_r<=0.4 and absmag_g-absmag_r>=0.2 and absmag_g>=4

S2

Find the total number of blue horizontal branch stars following Bell et al. (2010)
select count(*) as n from Lowing2014a..AqA2_stars 
where absmag_g-absmag_r>-0.27 and absmag_g-absmag_r<-0.06 and
absmag_u-absmag_g>0.98 and absmag_u-absmag_g<1.28 and
((absmag_g-absmag_r+0.06)/0.17)*((absmag_g-absmag_r+0.06)/0.17)+((absmag_u-absmag_g-0.98)/0.215)*((absmag_u-absmag_g-0.98)/0.215)>1

S3

Find the total number of K-giants following Xue et al. (2014)
select count(*) as n from Lowing2014a..AqA2_stars 
where absmag_g<=4 and absmag_g-absmag_r<=1.3 and absmag_g-absmag_r>=0.5 and
absmag_u-absmag_g<=3.5 and absmag_u-absmag_g>=0.5 and
absmag_g-absmag_r>=0.087*(log10(metallicity*62.2/(1.0-3.59*metallicity)))*(log10(metallicity*62.2/(1.0-3.59*metallicity)))+
0.39*(log10(metallicity*62.2/(1.0-3.59*metallicity)))+0.96

S4

Calculate the mass function of stars
select floor(mass/.1)*.1 as m,count(*) as n 
from Lowing2014a..AqA2_stars    
group by floor(mass/.1)*.1 
order by m

R1

Extract absolute magnitudes of a 1 in 1000 random sample of main sequence turning off stars following the criteria of Bell et al. (2010)
select absmag_u, absmag_g, absmag_r, absmag_i, absmag_z from Lowing2014a..AqA2_stars 
where absmag_g-absmag_r<=0.4 and absmag_g-absmag_r>=0.2 and absmag_g>=4 and random < 0.001

R2

Extract positions and velocities of a 1 in 10 sample of blue horizontal branch stars using criteria of Bell et al. (2010)
select x, y, z, v_x, v_y, v_z from Lowing2014a..AqA2_stars 
where absmag_g-absmag_r>-0.27 and absmag_g-absmag_r<-0.06 and
absmag_u-absmag_g>0.98 and absmag_u-absmag_g<1.28 and
((absmag_g-absmag_r+0.06)/0.17)*((absmag_g-absmag_r+0.06)/0.17)+((absmag_u-absmag_g-0.98)/0.215)*((absmag_u-absmag_g-0.98)/0.215)>1
and random < 0.1

R3

Download all properties of a 1 in 100 sample of of K-giants selected using criteria of Xue et al. (2014)
select * from Lowing2014a..AqA2_stars 
where absmag_g<=4 and absmag_g-absmag_r<=1.3 and absmag_g-absmag_r>=0.5 and
absmag_u-absmag_g<=3.5 and absmag_u-absmag_g>=0.5 and
absmag_g-absmag_r>=0.087*(log10(metallicity*62.2/(1.0-3.59*metallicity)))*(log10(metallicity*62.2/(1.0-3.59*metallicity)))+
0.39*(log10(metallicity*62.2/(1.0-3.59*metallicity)))+0.96
and random < 0.01