Re: it's not NULL, then what is it? - Mailing list pgsql-sql
From | Tena Sakai |
---|---|
Subject | Re: it's not NULL, then what is it? |
Date | |
Msg-id | FE44E0D7EAD2ED4BB2165071DB8E328C04E84C03@egcrc-ex01.egcrc.org Whole thread Raw |
In response to | it's not NULL, then what is it? ("Tena Sakai" <tsakai@gallo.ucsf.edu>) |
Responses |
Re: it's not NULL, then what is it?
|
List | pgsql-sql |
<p><font size="2">Hi Edward,<br /><br /> > Just out of curiosity did you try maf = 0?<br /><br /> Yes, and this is whatI get:<br /><br /> canon=# select maf<br /> canon-# from gallo.sds_seq_reg_shw<br /> canon-# where maf = 0;<br/> maf<br /> -----<br /> (0 rows)<br /><br /> Regards,<br /><br /> Tena Sakai<br /> tsakai@gallo.ucsf.edu<br/><br /><br /> -----Original Message-----<br /> From: pgsql-sql-owner@postgresql.org on behalf ofEdward W. Rouse<br /> Sent: Tue 6/30/2009 3:22 PM<br /> To: pgsql-sql@postgresql.org<br /> Subject: Re: [SQL] it's notNULL, then what is it?<br /><br /> Just out of curiosity did you try maf = 0?<br /><br /><br /><br /> Edward W. Rouse<br/><br /><br /><br /> From: pgsql-sql-owner@postgresql.org [<a href="mailto:pgsql-sql-owner@postgresql.org">mailto:pgsql-sql-owner@postgresql.org</a>]<br/> On Behalf Of Tena Sakai<br />Sent: Tuesday, June 30, 2009 6:03 PM<br /> To: pgsql-sql@postgresql.org<br /> Subject: [SQL] it's not NULL, then what isit?<br /><br /><br /><br /> Hi Everybody,<br /><br /> I have a table called gallo.sds_seq_reg_shw,<br /> which is like:<br/><br /> canon=# \d gallo.sds_seq_reg_shw<br /> Table "gallo.sds_seq_reg_shw"<br /> Column | Type | Modifiers<br /> ------------------+---------+-----------<br /> name | text |<br/> response | text |<br /> n | integer |<br /> source | text |<br /> test | text |<br /> ref | text |<br /> value | real |<br /> pvalue.term | real |<br /> stars.term | text |<br /> gtclass.test | text |<br /> fclass.test | text |<br /> gtclass.ref | text |<br /> fclass.ref | text |<br /> markerid | integer |<br /> maf | real |<br /> chromosome | text |<br /> physicalposition| integer |<br /> id | text |<br /> ctrast | text |<br /><br /> I amintereseted in the column maf (which is real):<br /><br /> canon=# select maf from gallo.sds_seq_reg_shw<br /> canon-# order by maf asc;<br /> maf <br /> -------------<br /> 0.000659631<br /> 0.000659631<br /> 0.000659631<br/> 0.000659631<br /> .<br /> (trunacated for the interest of breivity)<br /> .<br /><br/> Another way to look at this column is:<br /><br /> canon=# select maf from gallo.sds_seq_reg_shw<br /> canon-# order by maf desc;<br /> maf <br /> -------------<br /> <br /> <br /> <br/> .<br /> (trunacated for the interest of breivity)<br /> .<br /><br /> These rows shownare blanks, as far as I can tell.<br /> But...<br /><br /> canon=# select count(maf) from gallo.sds_seq_reg_shw;<br/> count<br /> -------<br /> 67284<br /> (1 row)<br /><br /> canon=# select count(maf)from gallo.sds_seq_reg_shw<br /> canon-# where maf ISNULL;<br /> count<br /> -------<br /> 0<br/> (1 row)<br /><br /> canon=#<br /> canon=# select count(maf) from gallo.sds_seq_reg_shw<br /> canon-# wheremaf NOTNULL;<br /> count<br /> -------<br /> 67284<br /> (1 row)<br /><br /> My confusion is that if theyare real and not null,<br /> what are they? How would I construct a query to do<br /> something like:<br /><br /> selectcount(maf)<br /> from gallo.sds_seq_reg_shw<br /> where maf ISBLANK;<br /><br /> Thank you in advance.<br /><br/> Regards,<br /><br /> Tena Sakai<br /> tsakai@gallo.ucsf.edu<br /><br /><br /></font>