POV-Ray : Newsgroups : povray.off-topic : Another dumb SQL question : Re: Another dumb SQL question Server Time
5 Sep 2024 11:20:02 EDT (-0400)
  Re: Another dumb SQL question  
From: Darren New
Date: 22 Jul 2009 17:54:23
Message: <4a678a8f$1@news.povray.org>
Halbert wrote:
> This isn't the real data, of course, just a similar example. I am just a 
> little fuzzy on how to get this together on SQL. Anyone have any pointers? 

You want to look for "outer join" and "group by".  Group each of the two 
tables my manufacturer to SUM() up the number sold and number in stock, then 
do an outer join on the manufacturer name (replacing NULL with 0 before 
display).

-- 
   Darren New, San Diego CA, USA (PST)
   "We'd like you to back-port all the changes in 2.0
    back to version 1.0."
   "We've done that already. We call it 2.0."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.