How to get ellipticities of galaxies from SDSS using casjobs? How to get ellipticities of a list of random galaxies. I saw few programs written in SQL and they were only giving stokes parameters and isophotes values for ONE galaxy(for which we input the ObjID). I am not familiar with syntax of SQL. Is there any method to put the objid in a loop so that the program generates stoke parameters values for a list of galaxies?
Just found out this method in casjobs.Previously I came across one SQL code in Stackexchange in which you have to input one ObjID to get its stokes parameters and isoA and isoB values.In sample codes in DR7, you can edit the line which gives Feild values and coordinates to get Stokes parameters(type q_r,u_r in their place).  

From stokes parametres you get the ellipiticity of the galaxy from this equation (which can be done in python.)

$e  = 1 - \frac{b}{a} = 1 - \frac{1 - \sqrt{Q^2 + U^2}}{1 + \sqrt{Q^2 + U^2}}.
$

Note that if you are downloading the Casjobs query data in CSV or excel format,You need to write python code to read the file and apply the formula
(to learn how to read csv files in python click here)