POV-Ray : Newsgroups : povray.off-topic : Another dumb SQL question : Another dumb SQL question Server Time
5 Sep 2024 11:20:20 EDT (-0400)
  Another dumb SQL question  
From: Halbert
Date: 22 Jul 2009 17:32:47
Message: <4a67857f@news.povray.org>
Say I have two tables:

Sales:
Manufacturer        Model        Number sold
=========        =====        ========
Ford                    F10            16
Ford                    Model T     13
Chevy                  Nova          2
VW                     Golf            3
VW                     Beetle         712


Stock:
Manufacturer        Model        Number In Stock
=========        =====        ===========
Ford                    Fairmont        31
Porsche                911               99
Renault                 Le Car          1
Cadillac                El Dorado     2
VW                      Square Back 71

I would like to combine this data with a query for results like:

Manufacturer            Number Sold            Number in Stock    Total
=========            =========            ===========      ====
Ford                         29                            31 
60
Chevy                       2                              0 
2
etc...

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? 
Muchas Gracias.

-- 


Post a reply to this message

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