Thanks Mr. Martin.
I forgot to include the price column in table C.
The linkage between table A and table B is ID and IDPUBLISHER, while Table
B to C is the ISBN. Also sometimes there are some titles that are not sold
in a given month.
TABLE A (Publisher)
-------------------------------
ID : NAME : EMAIL :
-------------------------------
1 : ABC : abc@abc
2 : CDE : cde@cde
-------------------------------
TABLE B (BOOKS TABLE)
-------------------------------------------------------------------
: IDBOOK : TITLE : PUBLISHER ID : ISBN
-------------------------------------------------------------------
: 1 : TITLE 01 : 1 : 001
: 2 : TITLE 02 : 1 : 002
: 3 : TITLE 03 : 2 : 003
: 4 : TITLE 04 : 2 : 004
-----------------------------------------------------------------
TABLE C (SALES OF BOOKS)
--------------------------------------------------------------------------------
: ID : ISBN : PRICE : QTY : DATE : LOCATION
--------------------------------------------------------------------------------
: 1 : 001 : 100 : 20 : 2012-12-01 :
: 2 : 001 : 50 : 11 : 2012-12-01 :
: 3 : 002 : 60 : 15 : 2012-12-01 :
: 4 : 003 : 100 : 10 : 2012-12-01 :
: 5 : 003 : 70 : 7 : 2012-12-01 :
: 6 : 003 : 100 : 8 : 2012-12-01 :
: 7 : 004 : 80 : 10 : 2012-12-01 :
---------------------------------------------------------------
How do I call up the sales in December 2012 for ABC Publisher or call the
sale in 2012 for ABC publisher?
2012/12/16 Martin Gainty <mgainty@stripped>
> We are unable to solve your problem unless you can display
>
> 1)all Foreign Key relationships indicating how one Table-column can access
> Primary key of another table
> 2)It is impossible to aggregate PriceOfBook information thru SUM or any
> other aggregator function(s) since PriceOfBook column is missing on
> all your tables
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
> > From: haidarpesebe@stripped
> > Date: Sun, 16 Dec 2012 13:59:36 +0700
> > Subject: Re: call up the sales
> > To: mysql@stripped
> >
> > I mean table B (sale of books) is TABLE C (sale of book). Sorry.
> > Sales reports on a monthly basis each publisher.
> > thanks for the help.
> >
> > 2012/12/16 Haidar Pesebe <haidarpesebe@stripped>
> >
> > > Dear All,
> > >
> > > I am asking for help to solve my problem to call the sale of books.
> > >
> > > There are 3 tables which each like this:
> > >
> > >
> > > TABLE A (Publisher)
> > > -------------------------------
> > > ID : NAME : EMAIL :
> > > -------------------------------
> > > 1 : ABC : abc@abc
> > > 2 : CDE : cde@cde
> > > -------------------------------
> > >
> > > TABLE B (BOOKS TABLE)
> > > -------------------------------------------------------------------
> > > : IDBOOK : TITLE : PUBLISHER ID : ISBN
> > > -------------------------------------------------------------------
> > > : 1 : TITLE 01 : 1 : 001
> > > : 2 : TITLE 02 : 1 : 002
> > > : 3 : TITLE 03 : 2 : 003
> > > : 4 : TITLE 04 : 2 : 004
> > > -----------------------------------------------------------------
> > >
> > > TABLE B (SALE OF BOOKS)
> > >
> > >
> --------------------------------------------------------------------------------
> > > : ID : ISBN : QTY : DATE : LOCATION
> > >
> > >
> --------------------------------------------------------------------------------
> > > : 1 : 001 : 20 : 2012-12-01 :
> > > : 2 : 001 : 11 : 2012-12-01 :
> > > : 3 : 002 : 15 : 2012-12-01 :
> > > : 4 : 003 : 10 : 2012-12-01 :
> > > : 5 : 003 : 7 : 2012-12-01 :
> > > : 6 : 003 : 8 : 2012-12-01 :
> > > : 7 : 004 : 10 : 2012-12-01 :
> > > ---------------------------------------------------------------
> > >
> > > How do I call up the sales in December 2012 for ABC Publisher or call
> the
> > > sale in 2012 for ABC publisher?
> > >
> > > Thanks and regards,
> > > Haidarpesebe
> > >
>