join query for sale report

join query for sale report

am 24.12.2010 18:27:27 von bharani kumar

--0016e65ae0c4d9caa704982b4cdd
Content-Type: text/plain; charset=ISO-8859-1

I want to take the sale report,

Group by catID ,

Daily report ,

table name : tblbasket BID Auto Incre, Prim Key

BID int(20), BasketSessionID varchar(100),ProductCode varchar(50), CatID
int(10), Quantity int(20), AfterDiscount double,purchasedate datetime,
Status int(3)

table name : tblsale SaleID Auto Incre, Prim Key

SaleID int(20), BillNo varchar(30), BasketSessionID varchar(200),
CatID int(10), AfterDiscount double, VAT int(20),purchasedate datetime,
Status int(2)


the above is my table structure,

I want to build two query ,

One query should display the daily sale report ,(for this i have
purchasedate, AfterDiscount nothing but an bill amount, Status once the
billing sucess then tblbasket status goes to 3 and tblsale Status goes to 1,
On both table relationship is only BasketSessionID )

second query, this query should display the sale report group by cat id with
VAt(vat is present in sale table, )

How to create the query ,For this scenario


and another is

--0016e65ae0c4d9caa704982b4cdd--

Re: join query for sale report

am 26.12.2010 17:12:18 von bharani kumar

--001485f77552cc39900498527b37
Content-Type: text/plain; charset=ISO-8859-1

any suggestion, for my question plz

On Fri, Dec 24, 2010 at 10:57 PM, bharani kumar <
bharanikumariyerphp@gmail.com> wrote:

> I want to take the sale report,
>
> Group by catID ,
>
> Daily report ,
>
> table name : tblbasket BID Auto Incre, Prim Key
>
> BID int(20), BasketSessionID varchar(100),ProductCode varchar(50),
> CatID int(10), Quantity int(20), AfterDiscount double,purchasedate datetime,
> Status int(3)
>
> table name : tblsale SaleID Auto Incre, Prim Key
>
> SaleID int(20), BillNo varchar(30), BasketSessionID varchar(200),
> CatID int(10), AfterDiscount double, VAT int(20),purchasedate datetime,
> Status int(2)
>
>
> the above is my table structure,
>
> I want to build two query ,
>
> One query should display the daily sale report ,(for this i have
> purchasedate, AfterDiscount nothing but an bill amount, Status once the
> billing sucess then tblbasket status goes to 3 and tblsale Status goes to 1,
> On both table relationship is only BasketSessionID )
>
> second query, this query should display the sale report group by cat id
> with VAt(vat is present in sale table, )
>
> How to create the query ,For this scenario
>
>
> and another is
>
>
>


--
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/

--001485f77552cc39900498527b37--