[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



On Jan 21, 2004, at 10:34 AM, Dylan Northrup wrote:
> I'm not much of a SQL guru, but wouldn't this work:
>
> select t.name from t TITLE, c COPY where c.owner = "whoever" and
> 	c.title_key = f.title_key;

Thanks guys.  Hmm.  Both of these work if I use the DISTINCT keyword.  
But for some reason, such things as DISTINCT COUNT(name) don't work, 
and each copy goes toward the total.  I can't really afford to fetch 
all the results and count them on the client side.  I shouldn't have 
used the word "list", my mistake.

Hmm.  Looks like the inner join does the same thing--or were these 
other queries already implicitly inner joins?  I really dislike 
databases. :-)

So it's not a list I need, but a count.  Hrmm.

I bet I need sub-selects.  Something like   SELECT COUNT(*) FROM ( 
SELECT DISTINCT )

Thanks for your help.  I'm going to keep banging my head against it.

-- Jason


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00852" href="msg00852.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> matthew.brown at cordata.com (Matthew Brown)</li></ul></li>
<li><strong><a name="00862" href="msg00862.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> danscox at mindspring.com (Danny Cox)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00838" href="msg00838.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
<li><strong><a name="00846" href="msg00846.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> ale at jeffx.com (Jeff Tillotson)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00850.html">[ale] Hi</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00852.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00846.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00852.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00851"><strong>Date</strong></a></li>
<li><a href="threads.html#00851"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>