Viewing 8 posts - 1 through 9 (of 9 total)
Below is my query for the above tables.
SELECT a.icode,a.categorycode,a.description,sum(qty),date from items a
inner join sales b on a.icode=b.icode
inner join categories c on a.categorycode=c.code
October 25, 2018 at 11:32 pm
I have already tried some queries but there is something to add as I can not get the result, I could send the query when required. The table structure is...
October 24, 2018 at 10:25 pm
Thanks.
What about the query to get the required result.
October 23, 2018 at 10:48 pm
If a user execute the data between '10-07-2018' and '10-10-2018', the below result is to be appeared.
October 22, 2018 at 11:48 pm
CREATE TABLE [dbo].[Sales](
[Icode] [varchar](255) ,
[Ccode] [varchar](255) ,
[Qty] [int] ,
[Price] [float],
[Date] [datetime]
Insert into [dbo].[sales] (Icode,ccode,qty,price,date)
values
('1','111',10,10,'10/10/2015')
('1','111',5,13,'10/07/2016')
('1','111',3,15,'12/31/2016')
CREATE TABLE [dbo].[Item](
December 4, 2017 at 9:30 pm
CREATE TABLE [dbo].[Sales](
[Icode] [nvarchar](255) ,
[Ccode] [nvarchar](255) ,
[Qty] [int] ,
[Price] [float],
[Date] [datetime]
CREATE TABLE [dbo].[Item](
[Code] [varchar],
[Price] [float],
[Description] [varchar],
[DateFrom] [datetime],
[DateTo] [datetime]
December 4, 2017 at 4:12 am
Viewing 8 posts - 1 through 9 (of 9 total)