Update and Calculate FIFO

  • Hi ,
    I have a table that I want to calculate FIFO and update each price of items in table.
    in table picture , I have a drug_Code, type,dateTime_post,Total_sum,Cost_Perone.
    Type 1 is input products and  type 2,3 is output products.
    for example :
    40 products bought at 2013-09-30 with price 2205
    now I want to update rows of 4,5,6 that is type 2 and sold at different dates but total sum of Total_sum field is 40 that  equal to 40 that bought at first row. then  for other rows that type is 2,3 I want to update cost_perone to 2205 that for 2nd rows that is 100 till to sold items equal to 100.

    How can I write this query without cursor .?thanks for advanced.

  • Hamid-Sadeghian - Tuesday, October 30, 2018 12:15 AM

    Hi ,
    I have a table that I want to calculate FIFO and update each price of items in table.
    in table picture , I have a drug_Code, type,dateTime_post,Total_sum,Cost_Perone.
    Type 1 is input products and  type 2,3 is output products.
    for example :
    40 products bought at 2013-09-30 with price 2205
    now I want to update rows of 4,5,6 that is type 2 and sold at different dates but total sum of Total_sum field is 40 that  equal to 40 that bought at first row. then  for other rows that type is 2,3 I want to update cost_perone to 2205 that for 2nd rows that is 100 till to sold items equal to 100.

    How can I write this query without cursor .?thanks for advanced.

    Sure - can you set up your sample data as a CREATE TABLE and INSERTs to populate it with data, to exactly match the picture you've posted? For anyone wishing to help you, posting sample data (as a runnable script) with your question saves them a ton of time.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • ChrisM@Work - Tuesday, October 30, 2018 3:55 AM

    Hamid-Sadeghian - Tuesday, October 30, 2018 12:15 AM

    Hi ,
    I have a table that I want to calculate FIFO and update each price of items in table.
    in table picture , I have a drug_Code, type,dateTime_post,Total_sum,Cost_Perone.
    Type 1 is input products and  type 2,3 is output products.
    for example :
    40 products bought at 2013-09-30 with price 2205
    now I want to update rows of 4,5,6 that is type 2 and sold at different dates but total sum of Total_sum field is 40 that  equal to 40 that bought at first row. then  for other rows that type is 2,3 I want to update cost_perone to 2205 that for 2nd rows that is 100 till to sold items equal to 100.

    How can I write this query without cursor .?thanks for advanced.

    Sure - can you set up your sample data as a CREATE TABLE and INSERTs to populate it with data, to exactly match the picture you've posted? For anyone wishing to help you, posting sample data (as a runnable script) with your question saves them a ton of time.

    Thank you for your hint.
    Sample data and table script was attached

  • Hamid-Sadeghian - Tuesday, October 30, 2018 4:09 AM

    ChrisM@Work - Tuesday, October 30, 2018 3:55 AM

    Hamid-Sadeghian - Tuesday, October 30, 2018 12:15 AM

    Hi ,
    I have a table that I want to calculate FIFO and update each price of items in table.
    in table picture , I have a drug_Code, type,dateTime_post,Total_sum,Cost_Perone.
    Type 1 is input products and  type 2,3 is output products.
    for example :
    40 products bought at 2013-09-30 with price 2205
    now I want to update rows of 4,5,6 that is type 2 and sold at different dates but total sum of Total_sum field is 40 that  equal to 40 that bought at first row. then  for other rows that type is 2,3 I want to update cost_perone to 2205 that for 2nd rows that is 100 till to sold items equal to 100.

    How can I write this query without cursor .?thanks for advanced.

    Sure - can you set up your sample data as a CREATE TABLE and INSERTs to populate it with data, to exactly match the picture you've posted? For anyone wishing to help you, posting sample data (as a runnable script) with your question saves them a ton of time.

    Thank you for your hint.
    Sample data and table script was attached

    Thanks for that - I'm very sorry but I cannot make head or tail of your description of the problem domain. Can you put in some additional detail please? Also, it often helps to show before and after using some of the data as an example. Thanks.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • ChrisM@Work - Tuesday, October 30, 2018 10:49 AM

    Hamid-Sadeghian - Tuesday, October 30, 2018 4:09 AM

    ChrisM@Work - Tuesday, October 30, 2018 3:55 AM

    Hamid-Sadeghian - Tuesday, October 30, 2018 12:15 AM

    Hi ,
    I have a table that I want to calculate FIFO and update each price of items in table.
    in table picture , I have a drug_Code, type,dateTime_post,Total_sum,Cost_Perone.
    Type 1 is input products and  type 2,3 is output products.
    for example :
    40 products bought at 2013-09-30 with price 2205
    now I want to update rows of 4,5,6 that is type 2 and sold at different dates but total sum of Total_sum field is 40 that  equal to 40 that bought at first row. then  for other rows that type is 2,3 I want to update cost_perone to 2205 that for 2nd rows that is 100 till to sold items equal to 100.

    How can I write this query without cursor .?thanks for advanced.

    Sure - can you set up your sample data as a CREATE TABLE and INSERTs to populate it with data, to exactly match the picture you've posted? For anyone wishing to help you, posting sample data (as a runnable script) with your question saves them a ton of time.

    Thank you for your hint.
    Sample data and table script was attached

    Thanks for that - I'm very sorry but I cannot make head or tail of your description of the problem domain. Can you put in some additional detail please? Also, it often helps to show before and after using some of the data as an example. Thanks.

    Thank you for reply
    please see the excel file that was attached.
     in this excel file cost_expected is the column that I need to calculate. in the description column I explain more.

  • Hamid-Sadeghian - Wednesday, October 31, 2018 12:08 AM

    Thank you for reply
    please see the excel file that was attached.
     in this excel file cost_expected is the column that I need to calculate. in the description column I explain more.

    Please don't post spreadsheets.   That's not consumable, and many folks are not going to be willing to trust a spreadsheet from what amounts to "a stranger on the internet".   You really need to learn to use the IF code tags in your post.   You surround a given section of your post with these start and end tags and that section will appear in the right kind of format.   As an example, you can use a left bracket ( [ ) and the word code, followed immediately by an  = which is then followed immediately by "SQL", including the quote marks (which are double-quotes, by the way).   Then you add a right bracket ( ] ).   That's the starting tag for some T-SQL.   The end tag starts with left bracket, then /code, then right bracket.   It's up to you to do a lot more of the work here than you seem to be prepared to do.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Building on what Steve said, something like this:
    Notes:
    Don't include the USE databasename, most people either use a dedicated sandbox database or tempdb.
    Don't include the keyword PRIMARY in your DDL.  Either leave it off completely or change it to DEFAULT.  I have a default file group for data in my sandbox database.  I do not put user tables or indexes in the PRIMARY filegroup.
    Include code to drop any tables (or other database objects you need) you are creating if they already exist.  I also put this code at the end of my scripts to clean up the database when I am done (usually commented while working on a problem).


    /****** Object: Table [dbo].[TestTable]  Script Date: 08/08/1397 01:37:51 ?.? ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    if object_id('[dbo].[TestTable]','U') is not null
    drop table [dbo].[TestTable];

    CREATE TABLE [dbo].[TestTable](
        [Drug_code] [int] NOT NULL,
        [type] [tinyint] NOT NULL,
        [HeaderDate_Post] [nchar](10) NOT NULL,
        [DateTime_Post] [datetime] NULL,
        [Total_Sum] [float] NOT NULL,
        [Cost_PerOne] [float] NULL,
        [sumtotal] [float] NULL,
        [firstvalue] [float] NULL
    ) ON [DEFAULT]
    GO
    INSERT [dbo].[TestTable] ([Drug_code], [type], [HeaderDate_Post], [DateTime_Post], [Total_Sum], [Cost_PerOne], [sumtotal], [firstvalue])
    VALUES
       (1010, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:55.700' AS DateTime), 40, 2205, 40, 40)
      ,(1010, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:55.747' AS DateTime), 100, 2205, 140, 100)
      ,(1010, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:29.030' AS DateTime), 5, 2049, 145, 5)
      ,(1010, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 20, 2049, 115, 20)
      ,(1010, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 10, 2049, 115, 20)
      ,(1010, 2, N'1392/09/27', CAST(N'2013-12-18T11:30:11.793' AS DateTime), 10, 2049, 105, 10)
      ,(1010, 2, N'1392/10/08', CAST(N'2013-12-29T15:28:23.370' AS DateTime), 40, 2205, 65, 40)
      ,(1010, 1, N'1392/10/30', CAST(N'2014-01-20T15:14:12.447' AS DateTime), 5, 2049, 70, 5)
      ,(1010, 2, N'1393/01/15', CAST(N'2014-06-10T15:02:11.363' AS DateTime), 20, 2049, 50, 20)
      ,(1010, 2, N'1393/03/05', CAST(N'2014-06-10T15:02:51.280' AS DateTime), 5, 2049, 40, 5)
      ,(1010, 2, N'1393/03/05', CAST(N'2014-06-10T15:02:51.280' AS DateTime), 5, 2049, 40, 5)
      ,(1010, 1, N'1392/06/10', CAST(N'2014-06-14T14:44:47.167' AS DateTime), 60, 2049, 100, 60)
      ,(1010, 2, N'1393/05/26', CAST(N'2014-08-19T10:03:47.637' AS DateTime), 220, 2205, -162, 220)
      ,(1010, 2, N'1393/05/26', CAST(N'2014-08-19T10:03:47.637' AS DateTime), 42, 2205, -162, 220)
      ,(1010, 1, N'1392/06/11', CAST(N'2014-08-19T11:58:32.907' AS DateTime), 280, 2205, 118, 280)
      ,(1010, 1, N'1392/06/11', CAST(N'2014-08-19T11:58:32.940' AS DateTime), 90, 2205, 208, 90)
      ,(1010, 2, N'1393/10/06', CAST(N'2014-12-27T12:56:56.183' AS DateTime), 40, 2205, 158, 40)
      ,(1010, 2, N'1393/10/06', CAST(N'2014-12-27T12:56:56.183' AS DateTime), 5, 2049, 158, 40)
      ,(1010, 2, N'1393/10/06', CAST(N'2014-12-27T12:56:56.183' AS DateTime), 5, 2205, 158, 40)
      ,(1010, 2, N'1393/10/30', CAST(N'2015-01-21T16:05:01.287' AS DateTime), 13, 2049, 145, 13)
      ,(1010, 2, N'1393/11/04', CAST(N'2015-01-24T13:02:39.810' AS DateTime), 48, 2205, 97, 48)
      ,(1010, 2, N'1393/10/30', CAST(N'2015-01-25T09:54:35.977' AS DateTime), 48, 2205, 49, 48)
      ,(1010, 2, N'1394/04/06', CAST(N'2015-09-15T11:49:56.703' AS DateTime), 6, 2049, 38, 6)
      ,(1010, 2, N'1394/04/06', CAST(N'2015-09-15T11:49:56.703' AS DateTime), 5, 2049, 38, 6)
      ,(1010, 2, N'1394/09/17', CAST(N'2015-12-08T15:32:52.443' AS DateTime), 48, 2205, -52, 48)
      ,(1010, 2, N'1394/09/17', CAST(N'2015-12-08T15:32:52.443' AS DateTime), 42, 2205, -52, 48)
      ,(1010, 1, N'1394/09/18', CAST(N'2015-12-09T10:02:39.150' AS DateTime), 100, 6400, 48, 100)
      ,(1010, 2, N'1394/10/12', CAST(N'2016-01-02T10:18:19.687' AS DateTime), 20, 2205, 28, 20)
      ,(1010, 2, N'1394/10/12', CAST(N'2016-01-02T11:37:43.917' AS DateTime), 50, 6400, -22, 50)
      ,(1010, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 50, 6400, -72, 50)
      ,(1010, 1, N'1394/10/13', CAST(N'2016-01-03T17:00:50.537' AS DateTime), 200, 6400, 128, 200)
      ,(1010, 2, N'1394/10/28', CAST(N'2016-01-18T10:23:33.620' AS DateTime), 10, 2205, 118, 10)
      ,(1010, 2, N'1394/11/03', CAST(N'2016-01-23T11:10:09.680' AS DateTime), 28, 2205, 18, 28)
      ,(1010, 2, N'1394/11/03', CAST(N'2016-01-23T11:10:09.680' AS DateTime), 50, 6400, 18, 28)
      ,(1010, 2, N'1394/11/03', CAST(N'2016-01-23T11:10:09.680' AS DateTime), 22, 6400, 18, 28)
      ,(1010, 2, N'1394/10/13', CAST(N'2016-02-07T07:51:28.217' AS DateTime), 8, 2049, -22, 8)
      ,(1010, 2, N'1394/10/13', CAST(N'2016-02-07T07:51:28.217' AS DateTime), 32, 2205, -22, 8)
      ,(1010, 1, N'1393/12/29', CAST(N'2016-02-07T07:57:52.793' AS DateTime), 19, 2049, -3, 19)
      ,(1010, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 5, 6400, -28, 5)
      ,(1010, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 15, 6400, -28, 5)
      ,(1010, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 5, 6400, -28, 5)
      ,(1010, 1, N'1394/12/29', CAST(N'2016-03-19T13:12:08.850' AS DateTime), 40, 6400, 12, 40)
      ,(1010, 1, N'1394/12/29', CAST(N'2016-03-19T13:35:06.550' AS DateTime), 40, 6400, 52, 40)
      ,(1010, 2, N'1395/01/25', CAST(N'2016-07-05T09:18:33.837' AS DateTime), 5, 6400, 47, 5)
      ,(1010, 2, N'1394/11/06', CAST(N'2016-07-05T11:42:44.320' AS DateTime), 100, 6400, -53, 100)
      ,(1010, 2, N'1395/06/10', CAST(N'2016-08-31T11:45:48.700' AS DateTime), 5, 6400, -58, 5)
      ,(1010, 2, N'1395/07/18', CAST(N'2016-10-09T10:09:36.163' AS DateTime), 20, 6400, -78, 20)
      ,(1010, 2, N'1395/08/08', CAST(N'2016-10-29T10:56:33.357' AS DateTime), 20, 6400, -98, 20)
      ,(1010, 2, N'1395/12/15', CAST(N'2017-03-05T07:21:02.010' AS DateTime), 10, 6400, -108, 10)
      ,(1010, 1, N'1394/09/14', CAST(N'2017-03-11T14:38:45.763' AS DateTime), 100, 6400, -8, 100)
      ,(1010, 2, N'1395/12/14', CAST(N'2017-03-11T16:38:42.777' AS DateTime), 2, 6400, -10, 2)
      ,(1010, 2, N'1392/10/08', CAST(N'2017-03-11T17:19:32.390' AS DateTime), 60, 2205, -70, 60)
      ,(1010, 2, N'1395/12/14', CAST(N'2017-03-11T17:19:32.477' AS DateTime), 38, 6400, -108, 38)
      ,(1010, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 6, 2205, -114, 6)
      ,(1010, 2, N'1396/02/12', CAST(N'2017-05-02T09:49:32.550' AS DateTime), 10, 6400, -124, 10)
      ,(1010, 2, N'1396/02/12', CAST(N'2017-05-08T14:14:34.980' AS DateTime), 3, 2205, -154, 3)
      ,(1010, 2, N'1396/02/12', CAST(N'2017-05-08T14:14:34.980' AS DateTime), 27, 6400, -154, 3)
      ,(1010, 2, N'1396/02/20', CAST(N'2017-05-10T10:17:52.740' AS DateTime), 5, 6400, -159, 5)
      ,(1010, 2, N'1396/02/30', CAST(N'2017-05-20T14:21:20.610' AS DateTime), 10, 6400, -169, 10)
      ,(1010, 2, N'1396/03/08', CAST(N'2017-05-29T10:06:41.040' AS DateTime), 30, 6400, -199, 30)
      ,(1010, 1, N'1396/03/13', CAST(N'2017-06-03T09:57:31.280' AS DateTime), 300, 6400, 101, 300)
      ,(1010, 2, N'1396/03/21', CAST(N'2017-06-11T10:21:40.820' AS DateTime), 5, 6400, -19, 5)
      ,(1010, 2, N'1396/03/21', CAST(N'2017-06-11T10:21:40.820' AS DateTime), 115, 6400, -19, 5)
      ,(1010, 2, N'1396/03/29', CAST(N'2017-06-19T10:30:34.213' AS DateTime), 5, 6400, -24, 5)
      ,(1010, 2, N'1396/03/30', CAST(N'2017-06-20T11:10:21.143' AS DateTime), 50, 6400, -74, 50)
      ,(1010, 2, N'1396/04/04', CAST(N'2017-06-25T08:23:58.343' AS DateTime), 10, 6400, -84, 10)
      ,(1010, 2, N'1396/05/07', CAST(N'2017-07-29T15:56:53.633' AS DateTime), 10, 6400, -94, 10)
      ,(1010, 2, N'1396/05/30', CAST(N'2017-08-21T08:53:43.450' AS DateTime), 10, 6400, -104, 10)
      ,(1010, 2, N'1396/04/12', CAST(N'2017-09-23T14:51:51.850' AS DateTime), 2, 6400, -109, 2)
      ,(1010, 2, N'1396/04/12', CAST(N'2017-09-23T14:51:51.850' AS DateTime), 3, 6400, -109, 2)
      ,(1010, 2, N'1396/06/28', CAST(N'2017-09-23T14:51:56.807' AS DateTime), 20, 6400, -129, 20)
      ,(1010, 2, N'1396/08/23', CAST(N'2017-11-14T19:45:46.997' AS DateTime), 5, 6400, -134, 5)
      ,(1010, 2, N'1396/09/29', CAST(N'2017-12-20T09:02:44.207' AS DateTime), 10, 6400, -144, 10)
      ,(1010, 2, N'1396/09/29', CAST(N'2017-12-20T09:10:28.987' AS DateTime), 10, 6400, -154, 10)
      ,(1010, 2, N'1396/12/21', CAST(N'2018-03-12T16:15:29.637' AS DateTime), 50, 6400, -204, 50)
      ,(1010, 2, N'1397/02/29', CAST(N'2018-05-19T15:32:33.070' AS DateTime), 10, 6400, -214, 10)
      ,(1010, 2, N'1397/04/04', CAST(N'2018-06-25T11:50:24.930' AS DateTime), 30, 6400, -244, 30)
      ,(1010, 1, N'1397/04/09', CAST(N'2018-06-30T07:34:31.860' AS DateTime), 480, 7040, 236, 480)
      ,(1012, 1, N'1392/07/07', CAST(N'2013-09-29T17:50:13.013' AS DateTime), 10, 184348, 10, 10)
      ,(1012, 2, N'1392/10/30', CAST(N'2014-01-20T15:14:13.947' AS DateTime), 10, 184348, 0, 10)
      ,(1012, 1, N'1393/02/11', CAST(N'2014-05-01T11:19:45.120' AS DateTime), 10, 182605, 10, 10)
      ,(1012, 1, N'1393/09/13', CAST(N'2014-12-04T08:56:53.590' AS DateTime), 10, 139130, 20, 10)
      ,(1012, 2, N'1393/10/30', CAST(N'2015-01-24T15:44:10.257' AS DateTime), 10, 184348, 10, 10)
      ,(1012, 2, N'1394/04/06', CAST(N'2015-06-27T09:40:52.973' AS DateTime), 10, 139130, 0, 10)
      ,(1012, 2, N'1393/02/16', CAST(N'2017-03-11T16:20:04.950' AS DateTime), 10, 182605, -10, 10)
      ,(1012, 2, N'1392/07/15', CAST(N'2017-03-11T17:25:55.850' AS DateTime), 10, 184348, -20, 10)
      ,(1012, 1, N'1396/03/13', CAST(N'2017-06-03T09:57:31.280' AS DateTime), 10, 226087, -10, 10)
      ,(1012, 2, N'1396/03/21', CAST(N'2017-06-11T10:21:40.820' AS DateTime), 10, 226087, -20, 10)
      ,(1012, 1, N'1396/08/08', CAST(N'2017-10-30T10:24:56.170' AS DateTime), 30, 198500, 10, 30)
      ,(1012, 2, N'1396/09/22', CAST(N'2017-12-13T08:51:44.640' AS DateTime), 18, 198500, -8, 18)
      ,(1012, 2, N'1396/12/05', CAST(N'2018-02-24T10:08:50.387' AS DateTime), 3, 198500, -11, 3)
      ,(1012, 2, N'1396/12/07', CAST(N'2018-02-26T14:32:08.723' AS DateTime), 6, 198500, -17, 6)
      ,(1012, 2, N'1396/12/22', CAST(N'2018-03-13T10:59:18.223' AS DateTime), 2, 198500, -19, 2)
      ,(1012, 1, N'1397/04/25', CAST(N'2018-07-16T07:50:48.360' AS DateTime), 20, 102000, 1, 20)
      ,(1012, 1, N'1397/06/06', CAST(N'2018-08-28T10:35:20.407' AS DateTime), 20, 102000, 21, 20)
      ,(1018, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:55.950' AS DateTime), 5, 11803, 5, 5)
      ,(1018, 2, N'1394/04/20', CAST(N'2015-07-11T16:19:54.540' AS DateTime), 5, 11803, 0, 5)
      ,(1019, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:55.967' AS DateTime), 5, 6762, 5, 5)
      ,(1019, 2, N'1394/04/20', CAST(N'2015-07-11T16:19:54.540' AS DateTime), 5, 6762, 0, 5)
      ,(1024, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.327' AS DateTime), 100, 4427, 100, 100)
      ,(1024, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.340' AS DateTime), 30, 4427, 150, 30)
      ,(1024, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.340' AS DateTime), 20, 4427, 150, 30)
      ,(1024, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 100, 4427, 50, 100)
      ,(1024, 2, N'1394/11/03', CAST(N'2016-01-23T11:10:09.680' AS DateTime), 30, 4427, 0, 30)
      ,(1024, 2, N'1394/11/03', CAST(N'2016-01-23T11:10:09.680' AS DateTime), 20, 4427, 0, 30)
      ,(1025, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.310' AS DateTime), 80, 7104, 80, 80)
      ,(1025, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.327' AS DateTime), 50, 7104, 130, 50)
      ,(1025, 2, N'1393/10/30', CAST(N'2015-01-21T16:05:01.287' AS DateTime), 2, 5738, 128, 2)
      ,(1025, 2, N'1394/04/20', CAST(N'2015-07-11T16:19:54.540' AS DateTime), 50, 7104, 78, 50)
      ,(1025, 2, N'1394/05/11', CAST(N'2015-08-04T11:12:20.647' AS DateTime), 12, 5738, 66, 12)
      ,(1025, 1, N'1394/05/18', CAST(N'2015-08-09T09:52:16.463' AS DateTime), 50, 9180, 116, 50)
      ,(1025, 2, N'1394/06/18', CAST(N'2015-09-09T11:27:01.423' AS DateTime), 80, 7104, 36, 80)
      ,(1025, 2, N'1395/12/17', CAST(N'2017-03-07T13:17:45.590' AS DateTime), 50, 9180, -14, 50)
      ,(1025, 1, N'1392/06/10', CAST(N'2017-03-11T17:33:09.433' AS DateTime), 20, 5738, 6, 20)
      ,(1025, 1, N'1396/01/23', CAST(N'2017-04-12T10:19:12.950' AS DateTime), 50, 13600, 56, 50)
      ,(1028, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.903' AS DateTime), 50, 4257, 50, 50)
      ,(1028, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.920' AS DateTime), 100, 4257, 150, 100)
      ,(1028, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.937' AS DateTime), 100, 4257, 250, 100)
      ,(1028, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.983' AS DateTime), 170, 4257, 420, 170)
      ,(1028, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:36.840' AS DateTime), 5, 3770, 425, 5)
      ,(1028, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:36.857' AS DateTime), 10, 3770, 435, 10)
      ,(1028, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.217' AS DateTime), 32, 3770, 467, 32)
      ,(1028, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 2, 3770, 463, 2)
      ,(1028, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 2, 3770, 463, 2)
      ,(1028, 2, N'1392/09/27', CAST(N'2013-12-18T11:30:11.793' AS DateTime), 3, 3770, 457, 3)
      ,(1028, 2, N'1392/09/27', CAST(N'2013-12-18T11:30:11.793' AS DateTime), 3, 3770, 457, 3)
      ,(1028, 2, N'1392/10/24', CAST(N'2014-01-15T08:44:49.740' AS DateTime), 6, 3770, 451, 6)
      ,(1028, 2, N'1392/10/30', CAST(N'2014-01-21T15:09:59.797' AS DateTime), 75, 3770, 376, 75)
      ,(1028, 2, N'1392/10/30', CAST(N'2014-01-26T10:37:01.423' AS DateTime), 6, 4257, 370, 6)
      ,(1028, 2, N'1392/12/05', CAST(N'2014-02-24T13:50:34.480' AS DateTime), 30, 4257, 340, 30)
      ,(1028, 2, N'1393/04/04', CAST(N'2014-06-25T11:29:13.623' AS DateTime), 2, 3770, 338, 2)
      ,(1028, 2, N'1393/04/10', CAST(N'2014-07-01T13:27:57.767' AS DateTime), 2, 3770, 336, 2)
      ,(1028, 2, N'1393/04/10', CAST(N'2014-07-16T09:57:48.227' AS DateTime), 2, 3770, 286, 2)
      ,(1028, 2, N'1393/04/10', CAST(N'2014-07-16T09:57:48.227' AS DateTime), 10, 3770, 286, 2)
      ,(1028, 2, N'1393/04/10', CAST(N'2014-07-16T09:57:48.227' AS DateTime), 38, 3770, 286, 2)
      ,(1028, 2, N'1393/06/25', CAST(N'2014-09-16T09:02:21.787' AS DateTime), 10, 4257, 276, 10)
      ,(1028, 2, N'1393/06/25', CAST(N'2014-09-17T11:33:44.540' AS DateTime), 14, 3770, 262, 14)
      ,(1028, 2, N'1393/07/06', CAST(N'2014-09-28T14:42:19.763' AS DateTime), 30, 4257, 232, 30)
      ,(1028, 2, N'1393/06/17', CAST(N'2014-10-27T07:36:18.367' AS DateTime), 5, 3770, 225, 5)
      ,(1028, 2, N'1393/06/17', CAST(N'2014-10-27T07:36:18.367' AS DateTime), 2, 3770, 225, 5)
      ,(1028, 2, N'1393/08/25', CAST(N'2014-11-16T10:31:32.303' AS DateTime), 20, 4257, 205, 20)
      ,(1028, 2, N'1393/10/06', CAST(N'2014-12-27T12:56:56.183' AS DateTime), 10, 3770, 195, 10)
      ,(1028, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 30, 4257, 155, 30)
      ,(1028, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 10, 4257, 155, 30)
      ,(1028, 2, N'1393/10/07', CAST(N'2014-12-28T16:14:40.103' AS DateTime), 4, 4257, 151, 4)
      ,(1028, 2, N'1393/10/15', CAST(N'2015-01-05T14:30:20.563' AS DateTime), 25, 4257, 126, 25)
      ,(1028, 2, N'1393/10/21', CAST(N'2015-01-14T09:54:39.940' AS DateTime), 2, 4257, 124, 2)
      ,(1028, 1, N'1392/10/30', CAST(N'2015-01-14T17:19:53.140' AS DateTime), 76, 3770, 200, 76)
      ,(1028, 1, N'1393/10/30', CAST(N'2015-01-21T16:05:00.070' AS DateTime), 46, 3770, 246, 46)
      ,(1028, 2, N'1393/12/10', CAST(N'2015-03-03T11:19:19.703' AS DateTime), 15, 3770, 231, 15)
      ,(1028, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 2, 4257, 206, 2)
      ,(1028, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 10, 4257, 206, 2)
      ,(1028, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 10, 4257, 206, 2)
      ,(1028, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 3, 4257, 206, 2)
      ,(1028, 1, N'1393/12/29', CAST(N'2015-03-20T12:37:28.313' AS DateTime), 8, 3770, 214, 8)
      ,(1028, 2, N'1393/12/29', CAST(N'2015-03-20T13:16:11.963' AS DateTime), 24, 3770, 190, 24)
      ,(1028, 1, N'1393/12/29', CAST(N'2015-03-20T13:55:53.813' AS DateTime), 1, 4257, 191, 1)
      ,(1028, 1, N'1393/12/29', CAST(N'2015-03-20T15:54:41.177' AS DateTime), 1, 4257, 192, 1)
      ,(1028, 2, N'1393/10/06', CAST(N'2015-04-08T10:48:30.403' AS DateTime), 80, 4257, 112, 80)
      ,(1028, 2, N'1394/01/25', CAST(N'2015-04-14T07:54:53.483' AS DateTime), 10, 4257, 102, 10)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-17T08:31:47.767' AS DateTime), 31, 3770, 27, 31)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-17T08:31:47.767' AS DateTime), 8, 3770, 27, 31)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-17T08:31:47.767' AS DateTime), 36, 4257, 27, 31)
      ,(1028, 2, N'1394/02/08', CAST(N'2015-05-23T09:58:31.557' AS DateTime), 2, 4257, 25, 2)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-23T09:58:38.373' AS DateTime), 5, 4257, 10, 5)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-23T09:58:38.373' AS DateTime), 1, 4257, 10, 5)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-23T09:58:38.373' AS DateTime), 4, 4257, 10, 5)
      ,(1028, 2, N'1394/02/27', CAST(N'2015-05-23T09:58:38.373' AS DateTime), 5, 4257, 10, 5)
      ,(1028, 2, N'1394/04/02', CAST(N'2015-06-23T16:00:05.013' AS DateTime), 10, 4257, 0, 10)
      ,(1028, 1, N'1392/06/11', CAST(N'2015-07-13T11:57:59.417' AS DateTime), 60, 4257, 60, 60)
      ,(1028, 1, N'1394/02/22', CAST(N'2015-07-13T11:58:15.853' AS DateTime), 100, 10246, 160, 100)
      ,(1028, 2, N'1394/04/22', CAST(N'2015-07-20T11:21:33.203' AS DateTime), 5, 4257, 130, 5)
      ,(1028, 2, N'1394/04/22', CAST(N'2015-07-20T11:21:33.203' AS DateTime), 25, 10246, 130, 5)
      ,(1028, 2, N'1394/05/05', CAST(N'2015-07-27T16:09:41.077' AS DateTime), 10, 10246, 120, 10)
      ,(1028, 2, N'1394/05/11', CAST(N'2015-08-04T11:12:41.000' AS DateTime), 20, 3770, 99, 20)
      ,(1028, 2, N'1394/05/11', CAST(N'2015-08-04T11:12:41.000' AS DateTime), 1, 4257, 99, 20)
      ,(1028, 1, N'1392/06/10', CAST(N'2015-08-16T08:57:20.723' AS DateTime), 88, 3770, 187, 88)
      ,(1028, 2, N'1394/06/22', CAST(N'2015-09-13T11:38:44.467' AS DateTime), 15, 10246, 172, 15)
      ,(1028, 2, N'1394/04/31', CAST(N'2015-09-15T11:49:59.883' AS DateTime), 4, 4257, 168, 4)
      ,(1028, 2, N'1394/06/22', CAST(N'2015-09-15T11:50:07.593' AS DateTime), 3, 4257, 165, 3)
      ,(1028, 2, N'1394/02/14', CAST(N'2015-09-19T16:21:35.093' AS DateTime), 46, 4257, 119, 46)
      ,(1028, 2, N'1394/09/17', CAST(N'2015-12-08T15:32:52.443' AS DateTime), 5, 10246, 114, 5)
      ,(1028, 2, N'1394/09/23', CAST(N'2015-12-14T14:24:12.040' AS DateTime), 15, 10246, 99, 15)
      ,(1028, 2, N'1394/10/12', CAST(N'2016-01-02T10:18:19.687' AS DateTime), 10, 10246, 89, 10)
      ,(1028, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 3, 4257, 84, 3)
      ,(1028, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 2, 4257, 84, 3)
      ,(1028, 2, N'1394/09/02', CAST(N'2016-01-03T09:31:22.527' AS DateTime), 3, 4257, 81, 3)
      ,(1028, 2, N'1394/10/28', CAST(N'2016-01-18T10:23:33.620' AS DateTime), 15, 10246, 66, 15)
      ,(1028, 2, N'1394/11/05', CAST(N'2016-01-25T15:17:33.950' AS DateTime), 30, 12800, 36, 30)
      ,(1028, 2, N'1394/12/12', CAST(N'2016-03-12T15:21:24.050' AS DateTime), 22, 4257, 14, 22)
      ,(1028, 2, N'1392/11/08', CAST(N'2016-03-12T15:31:48.477' AS DateTime), 50, 4257, -36, 50)
      ,(1028, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 3, 12800, -47, 3)
      ,(1028, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 3, 12800, -47, 3)
      ,(1028, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 5, 10246, -47, 3)
      ,(1028, 2, N'1394/12/24', CAST(N'2016-03-19T03:37:24.113' AS DateTime), 3, 10246, -50, 3)
      ,(1028, 2, N'1394/11/05', CAST(N'2016-03-19T10:45:13.990' AS DateTime), 5, 10246, -55, 5)
      ,(1028, 2, N'1394/12/29', CAST(N'2016-03-19T13:12:08.893' AS DateTime), 45, 4257, -100, 45)
      ,(1028, 2, N'1394/12/29', CAST(N'2016-03-19T13:35:06.773' AS DateTime), 45, 4257, -145, 45)
      ,(1028, 2, N'1395/02/07', CAST(N'2016-04-27T15:14:00.613' AS DateTime), 30, 12800, -175, 30)
      ,(1028, 2, N'1395/03/12', CAST(N'2016-06-01T11:54:25.540' AS DateTime), 25, 12800, -235, 25)
      ,(1028, 2, N'1395/03/12', CAST(N'2016-06-01T11:54:25.540' AS DateTime), 5, 12800, -235, 25)
      ,(1028, 2, N'1395/03/12', CAST(N'2016-06-01T11:54:25.540' AS DateTime), 11, 12800, -235, 25)
      ,(1028, 2, N'1395/03/12', CAST(N'2016-06-01T11:54:25.540' AS DateTime), 19, 12800, -235, 25)
      ,(1028, 1, N'1394/10/22', CAST(N'2016-06-13T07:44:47.540' AS DateTime), 100, 12800, -135, 100)
      ,(1028, 1, N'1394/12/26', CAST(N'2016-06-13T07:44:48.367' AS DateTime), 16, 12800, -119, 16)
      ,(1028, 1, N'1395/02/27', CAST(N'2016-06-13T07:44:50.003' AS DateTime), 50, 12800, -69, 50)
      ,(1028, 1, N'1395/03/29', CAST(N'2016-06-18T14:00:34.027' AS DateTime), 100, 12800, 31, 100)
      ,(1028, 2, N'1395/01/25', CAST(N'2016-07-05T09:18:33.837' AS DateTime), 2, 12800, 29, 2)
      ,(1028, 2, N'1395/04/08', CAST(N'2016-07-05T09:18:37.423' AS DateTime), 5, 12800, 24, 5)
      ,(1028, 2, N'1394/11/05', CAST(N'2016-07-05T11:42:55.380' AS DateTime), 15, 12800, 9, 15)
      ,(1028, 2, N'1395/06/24', CAST(N'2016-09-14T11:22:51.473' AS DateTime), 40, 12800, -31, 40)
      ,(1028, 2, N'1395/07/07', CAST(N'2016-09-28T07:33:47.667' AS DateTime), 2, 12800, -71, 2)
      ,(1028, 2, N'1395/07/07', CAST(N'2016-09-28T07:33:47.667' AS DateTime), 30, 12800, -71, 2)
      ,(1028, 2, N'1395/07/07', CAST(N'2016-09-28T07:33:47.667' AS DateTime), 8, 12800, -71, 2)
      ,(1028, 2, N'1395/07/18', CAST(N'2016-10-09T10:09:36.163' AS DateTime), 15, 12800, -86, 15)
      ,(1028, 2, N'1395/07/19', CAST(N'2016-10-10T15:29:58.613' AS DateTime), 20, 12800, -106, 20)
      ,(1028, 2, N'1395/08/08', CAST(N'2016-10-29T10:56:33.357' AS DateTime), 15, 12800, -121, 15)
      ,(1028, 2, N'1395/09/13', CAST(N'2016-12-03T10:45:21.967' AS DateTime), 10, 12800, -131, 10)
      ,(1028, 2, N'1395/11/09', CAST(N'2017-03-04T09:34:40.363' AS DateTime), 3, 12800, -139, 3)
      ,(1028, 2, N'1395/11/09', CAST(N'2017-03-04T09:34:40.363' AS DateTime), 5, 12800, -139, 3)
      ,(1028, 2, N'1395/12/15', CAST(N'2017-03-05T07:21:02.010' AS DateTime), 4, 12800, -143, 4)
      ,(1028, 2, N'1395/12/15', CAST(N'2017-03-05T16:14:42.187' AS DateTime), 31, 12800, -193, 31)
      ,(1028, 2, N'1395/12/15', CAST(N'2017-03-05T16:14:42.187' AS DateTime), 19, 12800, -193, 31)
      ,(1028, 1, N'1395/08/11', CAST(N'2017-03-11T14:45:48.407' AS DateTime), 100, 12800, -93, 100)
      ,(1028, 2, N'1394/02/14', CAST(N'2017-03-11T17:40:06.733' AS DateTime), 100, 4257, -193, 100)
      ,(1028, 2, N'1393/10/07', CAST(N'2017-03-12T14:50:56.403' AS DateTime), 20, 4257, -213, 20)
      ,(1028, 2, N'1395/12/29', CAST(N'2017-03-19T11:28:34.223' AS DateTime), 2, 4257, -215, 2)
      ,(1028, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 5, 12800, -228, 5)
      ,(1028, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 5, 12800, -228, 5)
      ,(1028, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 3, 12800, -228, 5)
      ,(1028, 2, N'1396/02/12', CAST(N'2017-05-02T09:49:32.550' AS DateTime), 4, 12800, -232, 4)
      ,(1028, 2, N'1396/02/12', CAST(N'2017-05-02T14:56:41.480' AS DateTime), 50, 12800, -282, 50)
      ,(1028, 2, N'1396/02/12', CAST(N'2017-05-02T16:59:31.077' AS DateTime), 10, 12800, -292, 10)
      ,(1028, 2, N'1396/02/30', CAST(N'2017-05-20T14:21:20.610' AS DateTime), 5, 12800, -297, 5)
      ,(1028, 1, N'1396/03/13', CAST(N'2017-06-03T09:57:31.280' AS DateTime), 220, 12800, -77, 220)
      ,(1028, 2, N'1396/04/03', CAST(N'2017-06-24T10:27:05.927' AS DateTime), 10, 12800, -87, 10)
      ,(1028, 2, N'1396/04/04', CAST(N'2017-06-25T08:23:58.343' AS DateTime), 5, 12800, -102, 5)
      ,(1028, 2, N'1396/04/04', CAST(N'2017-06-25T08:23:58.343' AS DateTime), 10, 12800, -102, 5)
      ,(1028, 2, N'1396/04/14', CAST(N'2017-07-05T14:09:57.050' AS DateTime), 10, 12800, -112, 10)
      ,(1028, 2, N'1396/06/07', CAST(N'2017-08-29T10:44:25.350' AS DateTime), 40, 12800, -152, 40)
      ,(1028, 2, N'1396/04/12', CAST(N'2017-09-23T14:51:51.850' AS DateTime), 2, 12800, -154, 2)
      ,(1028, 2, N'1396/06/28', CAST(N'2017-09-23T14:51:54.513' AS DateTime), 1, 12800, -155, 1)
      ,(1028, 2, N'1396/06/28', CAST(N'2017-09-23T14:51:56.807' AS DateTime), 3, 12800, -158, 3)
      ,(1028, 2, N'1396/07/15', CAST(N'2017-10-07T07:34:39.393' AS DateTime), 2, 12800, -160, 2)
      ,(1028, 2, N'1396/09/29', CAST(N'2017-12-20T09:02:44.207' AS DateTime), 15, 12800, -175, 15)
      ,(1028, 2, N'1396/09/27', CAST(N'2017-12-25T07:12:37.297' AS DateTime), 3, 12800, -178, 3)
      ,(1028, 2, N'1396/11/15', CAST(N'2018-02-05T11:15:07.640' AS DateTime), 2, 12800, -180, 2)
      ,(1028, 2, N'1396/11/17', CAST(N'2018-02-06T09:58:04.950' AS DateTime), 10, 12800, -190, 10)
      ,(1028, 2, N'1396/12/12', CAST(N'2018-03-03T14:14:06.670' AS DateTime), 50, 12800, -240, 50)
      ,(1028, 2, N'1396/12/15', CAST(N'2018-03-06T08:31:55.900' AS DateTime), 3, 12800, -243, 3)
      ,(1028, 1, N'1396/12/27', CAST(N'2018-03-18T15:17:55.157' AS DateTime), 2, 12800, -241, 2)
      ,(1028, 1, N'1396/12/28', CAST(N'2018-03-19T11:38:06.113' AS DateTime), 3, 12800, -238, 3)
      ,(1028, 2, N'1397/04/12', CAST(N'2018-07-03T10:39:02.957' AS DateTime), 20, 12800, -258, 20)
      ,(1028, 2, N'1397/05/28', CAST(N'2018-08-19T09:56:43.077' AS DateTime), 2, 12800, -260, 2)
      ,(1029, 2, N'1392/10/18', CAST(N'2014-01-08T15:57:00.520' AS DateTime), 6, 152174, -6, 6)
      ,(1029, 2, N'1392/10/24', CAST(N'2014-01-15T08:44:49.740' AS DateTime), 6, 152174, -12, 6)
      ,(1029, 2, N'1392/10/28', CAST(N'2014-01-18T14:58:34.923' AS DateTime), 4, 152174, -16, 4)
      ,(1029, 1, N'1392/10/16', CAST(N'2014-01-19T11:23:57.400' AS DateTime), 10, 152174, -6, 10)
      ,(1068, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.153' AS DateTime), 240, 4918, 240, 240)
      ,(1068, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:36.700' AS DateTime), 20, 4282, 260, 20)
      ,(1068, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:36.717' AS DateTime), 30, 4282, 290, 30)
      ,(1068, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.233' AS DateTime), 47, 4282, 337, 47)
      ,(1068, 2, N'1392/10/24', CAST(N'2014-01-15T08:44:56.507' AS DateTime), 30, 4282, 297, 30)
      ,(1068, 2, N'1392/10/24', CAST(N'2014-01-15T08:44:56.507' AS DateTime), 10, 4282, 297, 30)
      ,(1068, 2, N'1393/04/24', CAST(N'2014-07-15T21:44:10.867' AS DateTime), 50, 4918, 247, 50)
      ,(1068, 2, N'1393/06/25', CAST(N'2014-09-17T11:33:26.787' AS DateTime), 1, 4282, 176, 1)
      ,(1068, 2, N'1393/06/25', CAST(N'2014-09-17T11:33:26.787' AS DateTime), 20, 4282, 176, 1)
      ,(1068, 2, N'1393/06/25', CAST(N'2014-09-17T11:33:26.787' AS DateTime), 50, 4918, 176, 1)
      ,(1068, 1, N'1393/08/05', CAST(N'2014-10-27T08:17:09.493' AS DateTime), 50, 7869, 226, 50)
      ,(1068, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 190, 4918, 36, 190)
      ,(1068, 1, N'1393/10/22', CAST(N'2015-01-12T15:47:44.273' AS DateTime), 40, 7869, 76, 40)
      ,(1068, 2, N'1393/10/23', CAST(N'2015-01-13T15:55:34.740' AS DateTime), 50, 7869, 26, 50)
      ,(1068, 2, N'1394/11/03', CAST(N'2016-01-23T11:10:09.680' AS DateTime), 20, 7869, 6, 20)
      ,(1068, 2, N'1394/12/29', CAST(N'2016-03-19T13:12:08.893' AS DateTime), 13, 7869, -7, 13)
      ,(1068, 2, N'1394/12/29', CAST(N'2016-03-19T13:35:06.773' AS DateTime), 13, 7869, -20, 13)
      ,(1068, 1, N'1395/02/26', CAST(N'2016-05-15T09:47:07.333' AS DateTime), 100, 7869, 80, 100)
      ,(1068, 2, N'1395/11/17', CAST(N'2017-02-05T14:14:45.313' AS DateTime), 50, 7869, 30, 50)
      ,(1068, 2, N'1394/08/05', CAST(N'2017-03-11T17:40:00.917' AS DateTime), 20, 7869, 10, 20)
      ,(1068, 2, N'1396/06/28', CAST(N'2017-09-19T12:03:39.460' AS DateTime), 30, 7869, -20, 30)
      ,(1068, 2, N'1396/09/12', CAST(N'2017-12-03T11:12:06.153' AS DateTime), 20, 7869, -40, 20)
      ,(1068, 1, N'1396/09/18', CAST(N'2017-12-09T09:45:25.710' AS DateTime), 30, 11900, -10, 30)
      ,(1068, 2, N'1396/09/21', CAST(N'2017-12-12T10:27:47.760' AS DateTime), 20, 11900, -30, 20)
      ,(1068, 1, N'1396/10/11', CAST(N'2018-01-01T08:46:18.847' AS DateTime), 50, 11900, 20, 50)
      ,(1068, 2, N'1396/12/22', CAST(N'2018-03-13T11:30:59.740' AS DateTime), 10, 11900, 0, 10)
      ,(1068, 2, N'1396/12/22', CAST(N'2018-03-13T11:30:59.740' AS DateTime), 10, 11900, 0, 10)
      ,(1068, 2, N'1396/12/28', CAST(N'2018-03-19T11:38:06.520' AS DateTime), 3, 11900, -3, 3)
      ,(1068, 2, N'1397/02/30', CAST(N'2018-05-20T16:06:15.990' AS DateTime), 20, 11900, -23, 20)
      ,(1068, 1, N'1397/06/06', CAST(N'2018-08-28T14:38:03.337' AS DateTime), 250, 15190, 227, 250)
      ,(1068, 2, N'1397/06/24', CAST(N'2018-09-15T17:52:35.713' AS DateTime), 20, 11900, 177, 20)
      ,(1068, 2, N'1397/06/24', CAST(N'2018-09-15T17:52:35.713' AS DateTime), 30, 15190, 177, 20)
      ,(1088, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.403' AS DateTime), 32, 47619, 32, 32)
      ,(1088, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.420' AS DateTime), 80, 47619, 112, 80)
      ,(1088, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.437' AS DateTime), 48, 47619, 160, 48)
      ,(1088, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.450' AS DateTime), 10, 47619, 170, 10)
      ,(1088, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.763' AS DateTime), 37, 47619, 207, 37)
      ,(1088, 1, N'1392/06/10', CAST(N'2013-09-25T14:04:05.810' AS DateTime), 3, 47619, 210, 3)
      ,(1088, 2, N'1392/07/13', CAST(N'2013-10-05T15:33:45.090' AS DateTime), 20, 47619, 190, 20)
      ,(1088, 2, N'1392/07/28', CAST(N'2013-10-20T14:32:35.760' AS DateTime), 2, 47619, 188, 2)
      ,(1088, 2, N'1392/08/19', CAST(N'2013-11-10T14:37:44.603' AS DateTime), 10, 47619, 178, 10)
      ,(1088, 2, N'1392/08/25', CAST(N'2013-11-16T15:02:46.493' AS DateTime), 16, 47619, 114, 16)
      ,(1088, 2, N'1392/08/25', CAST(N'2013-11-16T15:02:46.493' AS DateTime), 48, 47619, 114, 16)
      ,(1088, 1, N'1392/10/16', CAST(N'2014-01-06T16:17:53.123' AS DateTime), 10, 109091, 124, 10)
      ,(1088, 2, N'1392/10/30', CAST(N'2014-01-20T15:14:13.947' AS DateTime), 4, 47619, 120, 4)
      ,(1088, 2, N'1392/10/30', CAST(N'2014-01-21T15:09:59.797' AS DateTime), 9, 47619, 111, 9)
      ,(1088, 1, N'1392/10/30', CAST(N'2014-01-26T10:36:59.913' AS DateTime), 10, 47619, 121, 10)
      ,(1088, 2, N'1392/11/07', CAST(N'2014-01-27T14:35:12.293' AS DateTime), 5, 47619, 116, 5)
      ,(1088, 2, N'1392/12/03', CAST(N'2014-02-22T14:47:56.790' AS DateTime), 27, 47619, 79, 27)
      ,(1088, 2, N'1392/12/03', CAST(N'2014-02-22T14:47:56.790' AS DateTime), 10, 47619, 79, 27)
      ,(1088, 1, N'1392/12/14', CAST(N'2014-03-05T08:03:10.083' AS DateTime), 30, 109090, 109, 30)
      ,(1088, 2, N'1392/12/24', CAST(N'2014-03-16T08:16:41.950' AS DateTime), 4, 47619, 105, 4)
      ,(1088, 1, N'1392/12/27', CAST(N'2014-03-18T11:47:12.790' AS DateTime), 32, 109091, 137, 32)
      ,(1088, 2, N'1392/12/26', CAST(N'2014-03-18T16:07:32.000' AS DateTime), 6, 47619, 97, 6)
      ,(1088, 2, N'1392/12/26', CAST(N'2014-03-18T16:07:32.000' AS DateTime), 10, 109091, 97, 6)
      ,(1088, 2, N'1392/12/26', CAST(N'2014-03-18T16:07:32.000' AS DateTime), 24, 47619, 97, 6)
      ,(1088, 1, N'1393/02/03', CAST(N'2014-04-23T14:55:15.813' AS DateTime), 64, 109090, 161, 64)
      ,(1088, 2, N'1393/02/06', CAST(N'2014-04-28T07:04:22.067' AS DateTime), 2, 47619, 159, 2)
      ,(1088, 1, N'1393/02/11', CAST(N'2014-05-01T11:19:45.120' AS DateTime), 30, 109090, 189, 30)
      ,(1088, 1, N'1393/02/11', CAST(N'2014-05-01T11:39:23.017' AS DateTime), 16, 109090, 205, 16)
      ,(1088, 2, N'1393/02/14', CAST(N'2014-05-04T12:25:02.870' AS DateTime), 6, 47619, 169, 6)
      ,(1088, 2, N'1393/02/14', CAST(N'2014-05-04T12:25:02.870' AS DateTime), 30, 109090, 169, 6)
      ,(1088, 2, N'1393/03/05', CAST(N'2014-05-26T15:38:26.853' AS DateTime), 1, 109090, 168, 1)
      ,(1088, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 45, 109090, 77, 45)
      ,(1088, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 30, 109090, 77, 45)
      ,(1088, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 16, 109091, 77, 45)
      ,(1088, 1, N'1393/05/20', CAST(N'2014-08-11T14:44:15.183' AS DateTime), 20, 109090, 97, 20)
      ,(1088, 2, N'1393/05/20', CAST(N'2014-08-11T15:03:27.533' AS DateTime), 2, 109091, 95, 2)
      ,(1088, 2, N'1393/04/31', CAST(N'2014-08-19T10:07:18.407' AS DateTime), 1, 109090, 94, 1)
      ,(1088, 2, N'1393/02/14', CAST(N'2014-08-19T11:58:35.220' AS DateTime), 18, 109090, 76, 18)
      ,(1088, 1, N'1393/06/09', CAST(N'2014-08-31T10:12:04.250' AS DateTime), 30, 109090, 106, 30)
      ,(1088, 2, N'1393/08/18', CAST(N'2014-11-09T18:38:36.310' AS DateTime), 5, 109090, 101, 5)
      ,(1088, 2, N'1393/09/02', CAST(N'2014-11-23T11:41:52.783' AS DateTime), 25, 109090, 52, 25)
      ,(1088, 2, N'1393/09/02', CAST(N'2014-11-23T11:41:52.783' AS DateTime), 14, 109091, 52, 25)
      ,(1088, 2, N'1393/09/02', CAST(N'2014-11-23T11:41:52.783' AS DateTime), 10, 109090, 52, 25)
      ,(1088, 1, N'1393/09/05', CAST(N'2014-11-26T14:28:52.940' AS DateTime), 64, 109090, 116, 64)
      ,(1088, 2, N'1393/09/08', CAST(N'2014-12-30T08:54:27.723' AS DateTime), 2, 109090, 114, 2)
      ,(1088, 2, N'1393/10/24', CAST(N'2015-01-14T12:18:38.333' AS DateTime), 10, 109090, 66, 10)
      ,(1088, 2, N'1393/10/24', CAST(N'2015-01-14T12:18:38.333' AS DateTime), 16, 109090, 66, 10)
      ,(1088, 2, N'1393/10/24', CAST(N'2015-01-14T12:18:38.333' AS DateTime), 22, 109090, 66, 10)
      ,(1088, 2, N'1393/10/30', CAST(N'2015-01-21T12:43:14.703' AS DateTime), 2, 47619, 64, 2)
      ,(1088, 1, N'1393/10/30', CAST(N'2015-01-21T16:05:00.070' AS DateTime), 24, 47619, 88, 24)
      ,(1088, 2, N'1393/11/04', CAST(N'2015-01-24T13:02:39.810' AS DateTime), 10, 47619, 78, 10)
      ,(1088, 2, N'1393/10/30', CAST(N'2015-01-25T09:54:35.977' AS DateTime), 10, 47619, 68, 10)
      ,(1088, 2, N'1393/12/29', CAST(N'2015-03-20T12:37:29.760' AS DateTime), 25, 109090, 43, 25)
      ,(1088, 2, N'1394/02/01', CAST(N'2015-04-21T14:56:32.817' AS DateTime), 32, 109090, 11, 32)
      ,(1088, 1, N'1394/02/13', CAST(N'2015-05-03T11:03:46.010' AS DateTime), 80, 109090, 91, 80)
      ,(1088, 1, N'1394/03/06', CAST(N'2015-05-27T14:39:53.197' AS DateTime), 96, 109090, 187, 96)
      ,(1088, 2, N'1394/03/20', CAST(N'2015-06-10T14:27:44.840' AS DateTime), 42, 109090, 141, 42)
      ,(1088, 2, N'1394/03/20', CAST(N'2015-06-10T14:27:44.840' AS DateTime), 4, 109090, 141, 42)
      ,(1088, 2, N'1394/04/06', CAST(N'2015-06-27T10:03:22.253' AS DateTime), 2, 109090, 139, 2)
      ,(1088, 2, N'1394/06/14', CAST(N'2015-09-05T20:24:33.370' AS DateTime), 48, 109090, 91, 48)
      ,(1088, 2, N'1394/09/03', CAST(N'2015-11-24T14:14:43.623' AS DateTime), 32, 109090, 59, 32)
      ,(1088, 1, N'1394/09/09', CAST(N'2015-11-30T14:59:32.637' AS DateTime), 80, 109090, 139, 80)
      ,(1088, 2, N'1394/10/19', CAST(N'2016-01-09T15:21:04.083' AS DateTime), 10, 109090, 91, 10)
      ,(1088, 2, N'1394/10/19', CAST(N'2016-01-09T15:21:04.083' AS DateTime), 38, 109090, 91, 10)
      ,(1088, 2, N'1394/10/26', CAST(N'2016-01-16T11:08:12.900' AS DateTime), 1, 109090, 90, 1)
      ,(1088, 1, N'1394/11/18', CAST(N'2016-02-07T09:19:08.787' AS DateTime), 90, 127273, 180, 90)
      ,(1088, 1, N'1394/12/26', CAST(N'2016-03-16T15:57:48.283' AS DateTime), 6, 127273, 186, 6)
      ,(1088, 1, N'1394/12/29', CAST(N'2016-03-19T13:12:08.850' AS DateTime), 6, 109090, 192, 6)
      ,(1088, 1, N'1394/12/29', CAST(N'2016-03-19T13:35:06.550' AS DateTime), 6, 109090, 198, 6)
      ,(1088, 2, N'1394/12/29', CAST(N'2016-03-19T14:08:26.040' AS DateTime), 9, 109090, 189, 9)
      ,(1088, 2, N'1394/12/29', CAST(N'2016-03-19T14:24:24.763' AS DateTime), 9, 109090, 180, 9)
      ,(1088, 2, N'1395/01/21', CAST(N'2016-04-09T14:48:45.107' AS DateTime), 2, 109090, 178, 2)
      ,(1088, 2, N'1395/04/05', CAST(N'2016-06-26T08:51:22.697' AS DateTime), 3, 109090, 175, 3)
      ,(1088, 2, N'1395/04/06', CAST(N'2016-06-26T10:39:50.247' AS DateTime), 7, 109090, 98, 7)
      ,(1088, 2, N'1395/04/06', CAST(N'2016-06-26T10:39:50.247' AS DateTime), 70, 127273, 98, 7)
      ,(1088, 2, N'1395/04/08', CAST(N'2016-07-05T09:18:37.423' AS DateTime), 1, 109090, 97, 1)
      ,(1088, 2, N'1395/02/12', CAST(N'2016-07-05T11:42:31.797' AS DateTime), 29, 109090, 68, 29)
      ,(1088, 2, N'1395/07/18', CAST(N'2016-10-09T10:09:36.163' AS DateTime), 1, 127273, 67, 1)
      ,(1088, 2, N'1395/07/19', CAST(N'2016-10-10T15:29:58.613' AS DateTime), 5, 127273, 62, 5)
      ,(1088, 2, N'1395/11/23', CAST(N'2017-02-11T11:05:40.433' AS DateTime), 4, 127273, 52, 4)
      ,(1088, 2, N'1395/11/23', CAST(N'2017-02-11T11:05:40.433' AS DateTime), 6, 127273, 52, 4)
      ,(1088, 1, N'1395/07/28', CAST(N'2017-03-11T14:39:00.977' AS DateTime), 50, 109090, 102, 50)
      ,(1088, 2, N'1395/11/23', CAST(N'2017-03-11T16:20:42.423' AS DateTime), 30, 109090, 72, 30)
      ,(1088, 2, N'1395/10/22', CAST(N'2017-03-11T17:43:10.007' AS DateTime), 10, 127273, 62, 10)
      ,(1088, 2, N'1394/02/29', CAST(N'2017-03-12T14:50:57.660' AS DateTime), 10, 109090, 52, 10)
      ,(1088, 2, N'1394/02/29', CAST(N'2017-03-12T14:54:51.713' AS DateTime), 38, 109090, 14, 38)
      ,(1088, 2, N'1395/12/29', CAST(N'2017-03-19T11:28:34.223' AS DateTime), 27, 109090, -14, 27)
      ,(1088, 2, N'1395/12/29', CAST(N'2017-03-19T11:28:34.223' AS DateTime), 1, 127273, -14, 27)
      ,(1088, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 2, 127273, -16, 2)
      ,(1088, 2, N'1396/02/25', CAST(N'2017-05-20T15:14:28.180' AS DateTime), 5, 109090, -21, 5)
      ,(1088, 1, N'1396/03/01', CAST(N'2017-05-22T13:56:08.183' AS DateTime), 80, 127273, 59, 80)
      ,(1088, 2, N'1396/04/10', CAST(N'2017-07-01T15:20:39.793' AS DateTime), 5, 109090, 38, 5)
      ,(1088, 2, N'1396/04/10', CAST(N'2017-07-01T15:20:39.793' AS DateTime), 16, 127273, 38, 5)
      ,(1088, 2, N'1396/03/17', CAST(N'2017-07-04T08:08:07.877' AS DateTime), 1, 127273, 37, 1)
      ,(1088, 2, N'1396/08/15', CAST(N'2017-11-06T10:12:06.287' AS DateTime), 48, 127273, -11, 48)
      ,(1088, 1, N'1396/09/04', CAST(N'2017-11-25T08:30:08.027' AS DateTime), 64, 127273, 53, 64)
      ,(1088, 2, N'1396/09/14', CAST(N'2017-12-09T15:25:56.273' AS DateTime), 5, 127273, 48, 5)
      ,(1088, 2, N'1396/10/25', CAST(N'2018-01-15T14:09:43.053' AS DateTime), 1, 109090, 47, 1)
      ,(1088, 2, N'1396/12/05', CAST(N'2018-02-24T10:08:50.387' AS DateTime), 1, 127273, 46, 1)
      ,(1088, 2, N'1396/12/20', CAST(N'2018-03-12T08:17:18.150' AS DateTime), 4, 127273, 42, 4)
      ,(1088, 1, N'1396/12/27', CAST(N'2018-03-18T15:17:55.157' AS DateTime), 1, 127273, 43, 1)
      ,(1088, 2, N'1396/12/28', CAST(N'2018-03-19T11:38:06.520' AS DateTime), 6, 127273, 29, 6)
      ,(1088, 2, N'1396/12/28', CAST(N'2018-03-19T11:38:06.520' AS DateTime), 8, 127273, 29, 6)
      ,(1088, 2, N'1397/04/06', CAST(N'2018-06-27T12:11:07.527' AS DateTime), 6, 127273, 13, 6)
      ,(1088, 2, N'1397/04/06', CAST(N'2018-06-27T12:11:07.527' AS DateTime), 10, 127273, 13, 6)
      ,(1092, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.357' AS DateTime), 32, 57438, 32, 32)
      ,(1092, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.373' AS DateTime), 64, 57438, 96, 64)
      ,(1092, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.390' AS DateTime), 48, 57438, 144, 48)
      ,(1092, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.420' AS DateTime), 64, 57438, 208, 64)
      ,(1092, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:56.437' AS DateTime), 10, 57438, 218, 10)
      ,(1092, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:32.607' AS DateTime), 4, 59933, 226, 4)
      ,(1092, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:32.607' AS DateTime), 4, 59933, 226, 4)
      ,(1092, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:32.623' AS DateTime), 60, 59933, 286, 60)
      ,(1092, 1, N'1392/06/10', CAST(N'2013-09-25T14:04:06.247' AS DateTime), 3, 33333, 289, 3)
      ,(1092, 2, N'1392/07/28', CAST(N'2013-10-20T14:32:35.760' AS DateTime), 2, 57438, 287, 2)
      ,(1092, 2, N'1392/08/19', CAST(N'2013-11-10T14:37:44.603' AS DateTime), 10, 57438, 277, 10)
      ,(1092, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 1, 59933, 276, 1)
      ,(1092, 1, N'1392/10/16', CAST(N'2014-01-06T16:17:53.123' AS DateTime), 10, 109091, 286, 10)
      ,(1092, 2, N'1392/10/30', CAST(N'2014-01-21T15:09:59.797' AS DateTime), 9, 33333, 277, 9)
      ,(1092, 2, N'1392/11/07', CAST(N'2014-01-27T14:35:12.293' AS DateTime), 5, 57438, 272, 5)
      ,(1092, 2, N'1392/12/03', CAST(N'2014-02-22T14:47:56.790' AS DateTime), 47, 57438, 225, 47)
      ,(1092, 1, N'1392/12/14', CAST(N'2014-03-05T08:03:10.083' AS DateTime), 30, 109090, 255, 30)
      ,(1092, 1, N'1392/12/27', CAST(N'2014-03-18T11:47:12.790' AS DateTime), 64, 109091, 319, 64)
      ,(1092, 2, N'1393/02/06', CAST(N'2014-04-28T07:04:22.067' AS DateTime), 2, 57438, 317, 2)
      ,(1092, 2, N'1393/03/05', CAST(N'2014-05-26T15:38:26.853' AS DateTime), 1, 57438, 316, 1)
      ,(1092, 2, N'1393/03/25', CAST(N'2014-06-15T16:51:01.160' AS DateTime), 48, 57438, 236, 48)
      ,(1092, 2, N'1393/03/25', CAST(N'2014-06-15T16:51:01.160' AS DateTime), 32, 57438, 236, 48)
      ,(1092, 2, N'1393/03/25', CAST(N'2014-06-24T11:20:26.220' AS DateTime), 12, 59933, 220, 12)
      ,(1092, 2, N'1393/03/25', CAST(N'2014-06-24T11:20:26.220' AS DateTime), 4, 59933, 220, 12)
      ,(1092, 2, N'1393/05/20', CAST(N'2014-08-11T15:03:27.533' AS DateTime), 2, 57438, 218, 2)
      ,(1092, 1, N'1392/06/10', CAST(N'2014-08-16T12:12:06.320' AS DateTime), 48, 59933, 266, 48)
      ,(1092, 1, N'1392/10/30', CAST(N'2014-08-16T12:12:07.517' AS DateTime), 10, 59933, 276, 10)
      ,(1092, 2, N'1393/02/22', CAST(N'2014-08-19T10:03:41.620' AS DateTime), 16, 57438, 260, 16)
      ,(1092, 1, N'1392/06/11', CAST(N'2014-08-19T11:58:33.013' AS DateTime), 32, 57438, 292, 32)
      ,(1092, 2, N'1393/06/25', CAST(N'2014-09-17T11:33:26.787' AS DateTime), 17, 57438, 275, 17)
      ,(1092, 2, N'1393/08/18', CAST(N'2014-11-09T18:38:36.310' AS DateTime), 5, 57438, 270, 5)
      ,(1092, 2, N'1393/10/21', CAST(N'2015-01-13T15:57:08.437' AS DateTime), 3, 57438, 265, 3)
      ,(1092, 2, N'1393/10/21', CAST(N'2015-01-13T15:57:08.437' AS DateTime), 2, 57438, 265, 3)
      ,(1092, 2, N'1393/10/21', CAST(N'2015-01-14T09:54:39.940' AS DateTime), 2, 57438, 263, 2)
      ,(1092, 2, N'1393/10/24', CAST(N'2015-01-14T10:05:42.117' AS DateTime), 13, 57438, 205, 13)
      ,(1092, 2, N'1393/10/24', CAST(N'2015-01-14T10:05:42.117' AS DateTime), 25, 57438, 205, 13)
      ,(1092, 2, N'1393/10/24', CAST(N'2015-01-14T10:05:42.117' AS DateTime), 10, 57438, 205, 13)
      ,(1092, 2, N'1393/10/24', CAST(N'2015-01-14T10:05:42.117' AS DateTime), 10, 109091, 205, 13)
      ,(1092, 2, N'1393/10/30', CAST(N'2015-01-21T12:43:14.703' AS DateTime), 2, 33333, 203, 2)
      ,(1092, 2, N'1393/10/30', CAST(N'2015-01-21T16:05:01.287' AS DateTime), 1, 59933, 202, 1)
      ,(1092, 2, N'1393/11/20', CAST(N'2015-02-08T16:20:27.127' AS DateTime), 5, 57438, 197, 5)
      ,(1092, 2, N'1393/12/24', CAST(N'2015-03-15T09:21:12.160' AS DateTime), 32, 109091, 165, 32)
      ,(1092, 2, N'1393/12/22', CAST(N'2015-03-15T09:22:25.750' AS DateTime), 1, 57438, 164, 1)
      ,(1092, 1, N'1394/01/17', CAST(N'2015-04-06T15:18:24.330' AS DateTime), 48, 109090, 212, 48)
      ,(1092, 2, N'1394/04/06', CAST(N'2015-06-27T10:03:22.253' AS DateTime), 2, 109090, 210, 2)
      ,(1092, 2, N'1394/05/11', CAST(N'2015-08-02T15:17:18.020' AS DateTime), 18, 109090, 174, 18)
      ,(1092, 2, N'1394/05/11', CAST(N'2015-08-02T15:17:18.020' AS DateTime), 2, 109090, 174, 18)
      ,(1092, 2, N'1394/05/11', CAST(N'2015-08-02T15:17:18.020' AS DateTime), 16, 109090, 174, 18)
      ,(1092, 2, N'1394/05/11', CAST(N'2015-08-04T11:12:20.647' AS DateTime), 5, 57438, 154, 5)
      ,(1092, 2, N'1394/05/11', CAST(N'2015-08-04T11:12:20.647' AS DateTime), 15, 109091, 154, 5)
      ,(1092, 2, N'1393/11/27', CAST(N'2015-08-16T08:56:56.863' AS DateTime), 32, 109091, 122, 32)
      ,(1092, 2, N'1393/11/27', CAST(N'2015-08-16T08:56:57.270' AS DateTime), 27, 57438, 95, 27)
      ,(1092, 2, N'1394/06/22', CAST(N'2015-09-14T10:57:23.073' AS DateTime), 5, 57438, 90, 5)
      ,(1092, 2, N'1394/06/22', CAST(N'2015-09-14T10:57:45.037' AS DateTime), 6, 109091, 78, 6)
      ,(1092, 2, N'1394/06/22', CAST(N'2015-09-14T10:57:45.037' AS DateTime), 6, 109090, 78, 6)
      ,(1092, 2, N'1394/07/20', CAST(N'2015-10-13T09:37:22.510' AS DateTime), 16, 109090, 62, 16)
      ,(1092, 1, N'1394/08/13', CAST(N'2015-11-04T13:42:53.833' AS DateTime), 80, 109090, 142, 80)
      ,(1092, 1, N'1394/09/09', CAST(N'2015-11-30T14:59:32.637' AS DateTime), 48, 109090, 190, 48)
      ,(1092, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 1, 109090, 189, 1)
      ,(1092, 2, N'1394/10/26', CAST(N'2016-01-16T11:08:12.900' AS DateTime), 1, 109090, 188, 1)
      ,(1092, 1, N'1394/12/26', CAST(N'2016-03-16T15:57:48.283' AS DateTime), 1, 109090, 189, 1)
      ,(1092, 1, N'1394/12/29', CAST(N'2016-03-19T13:12:08.850' AS DateTime), 4, 109090, 193, 4)
      ,(1092, 1, N'1394/12/29', CAST(N'2016-03-19T13:35:06.550' AS DateTime), 4, 109090, 197, 4)
      ,(1092, 2, N'1394/12/29', CAST(N'2016-03-19T14:08:26.040' AS DateTime), 4, 109090, 193, 4)
      ,(1092, 2, N'1394/12/29', CAST(N'2016-03-19T14:24:24.763' AS DateTime), 4, 109090, 189, 4)
      ,(1092, 2, N'1395/01/21', CAST(N'2016-04-09T14:48:45.107' AS DateTime), 2, 109090, 187, 2)
      ,(1092, 2, N'1395/02/28', CAST(N'2016-05-17T14:31:39.893' AS DateTime), 1, 109090, 168, 1)
      ,(1092, 2, N'1395/02/28', CAST(N'2016-05-17T14:31:39.893' AS DateTime), 18, 109090, 168, 1)
      ,(1092, 1, N'1395/04/06', CAST(N'2016-06-26T07:54:27.783' AS DateTime), 50, 109090, 218, 50)
      ,(1092, 2, N'1395/04/05', CAST(N'2016-06-26T08:51:22.697' AS DateTime), 3, 109090, 215, 3)
      ,(1092, 2, N'1395/04/08', CAST(N'2016-07-05T09:18:37.423' AS DateTime), 1, 109090, 214, 1)
      ,(1092, 2, N'1395/02/28', CAST(N'2016-07-05T11:43:05.993' AS DateTime), 45, 109090, 169, 45)
      ,(1092, 2, N'1395/07/18', CAST(N'2016-10-09T10:09:36.163' AS DateTime), 1, 109090, 168, 1)
      ,(1092, 2, N'1395/07/19', CAST(N'2016-10-10T15:29:58.613' AS DateTime), 5, 109090, 163, 5)
      ,(1092, 1, N'1395/07/28', CAST(N'2016-10-19T10:26:11.590' AS DateTime), 80, 109090, 243, 80)
      ,(1092, 2, N'1395/08/19', CAST(N'2016-12-03T11:21:31.543' AS DateTime), 2, 109090, 241, 2)
      ,(1092, 2, N'1394/09/03', CAST(N'2016-12-10T11:18:42.000' AS DateTime), 48, 109090, 193, 48)
      ,(1092, 2, N'1395/10/22', CAST(N'2017-03-11T17:20:48.547' AS DateTime), 20, 109090, 173, 20)
      ,(1092, 2, N'1395/10/22', CAST(N'2017-03-11T17:20:50.067' AS DateTime), 5, 109090, 168, 5)
      ,(1092, 2, N'1394/02/29', CAST(N'2017-03-12T14:50:47.983' AS DateTime), 10, 109090, 158, 10)
      ,(1092, 2, N'1394/05/17', CAST(N'2017-03-12T14:54:27.233' AS DateTime), 14, 109090, 144, 14)
      ,(1092, 1, N'1395/12/28', CAST(N'2017-03-19T09:54:35.750' AS DateTime), 2, 109090, 146, 2)
      ,(1092, 2, N'1395/12/29', CAST(N'2017-03-19T11:28:34.223' AS DateTime), 4, 109090, 142, 4)
      ,(1092, 2, N'1396/02/25', CAST(N'2017-05-20T15:14:28.180' AS DateTime), 5, 109090, 137, 5)
      ,(1092, 2, N'1396/03/17', CAST(N'2017-07-04T08:08:07.877' AS DateTime), 1, 109090, 136, 1)
      ,(1092, 2, N'1396/05/21', CAST(N'2017-08-12T14:42:46.127' AS DateTime), 20, 109090, 116, 20)
      ,(1092, 2, N'1396/09/29', CAST(N'2017-12-20T15:57:59.450' AS DateTime), 5, 109090, 66, 5)
      ,(1092, 2, N'1396/09/29', CAST(N'2017-12-20T15:57:59.450' AS DateTime), 45, 109090, 66, 5)
      ,(1092, 2, N'1396/12/05', CAST(N'2018-02-24T10:08:50.387' AS DateTime), 1, 109090, 65, 1)
      ,(1092, 2, N'1396/12/15', CAST(N'2018-03-06T13:58:19.937' AS DateTime), 13, 109090, 52, 13)
      ,(1092, 2, N'1396/12/20', CAST(N'2018-03-12T08:17:18.150' AS DateTime), 3, 109090, 48, 3)
      ,(1092, 2, N'1396/12/20', CAST(N'2018-03-12T08:17:18.150' AS DateTime), 1, 109090, 48, 3)
      ,(1092, 2, N'1396/12/20', CAST(N'2018-03-13T07:12:41.953' AS DateTime), 2, 109090, 46, 2)
      ,(1092, 1, N'1396/12/27', CAST(N'2018-03-18T15:17:55.157' AS DateTime), 3, 109090, 49, 3)
      ,(1092, 1, N'1396/12/28', CAST(N'2018-03-19T11:38:06.113' AS DateTime), 1, 109090, 50, 1)
      ,(1092, 1, N'1397/01/29', CAST(N'2018-04-18T08:49:58.937' AS DateTime), 48, 140000, 98, 48)
      ,(1092, 2, N'1397/02/04', CAST(N'2018-04-24T15:37:02.687' AS DateTime), 16, 109090, 82, 16)
      ,(1092, 2, N'1397/02/03', CAST(N'2018-04-25T10:35:17.210' AS DateTime), 5, 109090, 33, 5)
      ,(1092, 2, N'1397/02/03', CAST(N'2018-04-25T10:35:17.210' AS DateTime), 29, 109090, 33, 5)
      ,(1092, 2, N'1397/02/03', CAST(N'2018-04-25T10:35:17.210' AS DateTime), 15, 109090, 33, 5)
      ,(1092, 2, N'1397/02/03', CAST(N'2018-04-25T10:35:21.180' AS DateTime), 5, 109090, 28, 5)
      ,(1092, 2, N'1397/03/12', CAST(N'2018-08-19T09:56:40.777' AS DateTime), 4, 109090, 24, 4)
      ,(1127, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:55.857' AS DateTime), 500, 3238, 500, 500)
      ,(1127, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:29.187' AS DateTime), 330, 2951, 830, 330)
      ,(1127, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:29.200' AS DateTime), 70, 2951, 900, 70)
      ,(1127, 1, N'1392/06/10', CAST(N'2013-09-25T14:04:06.530' AS DateTime), 51, 2752, 951, 51)
      ,(1127, 1, N'1392/06/10', CAST(N'2013-09-25T14:04:06.543' AS DateTime), 16, 2752, 967, 16)
      ,(1127, 1, N'1392/06/10', CAST(N'2013-10-27T19:20:09.947' AS DateTime), 76, 2951, 1043, 76)
      ,(1127, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 5, 2951, 1028, 5)
      ,(1127, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 10, 2951, 1028, 5)
      ,(1127, 2, N'1392/07/29', CAST(N'2014-01-14T14:17:50.213' AS DateTime), 100, 3238, 928, 100)
      ,(1127, 1, N'1392/06/11', CAST(N'2014-01-15T20:20:42.120' AS DateTime), 100, 3238, 1028, 100)
      ,(1127, 1, N'1392/10/30', CAST(N'2014-01-20T15:14:12.447' AS DateTime), 20, 2951, 1048, 20)
      ,(1127, 2, N'1392/10/30', CAST(N'2014-01-21T15:09:59.797' AS DateTime), 43, 2752, 1005, 43)
      ,(1127, 2, N'1392/11/13', CAST(N'2014-02-02T13:50:27.860' AS DateTime), 200, 3238, 805, 200)
      ,(1127, 1, N'1392/11/21', CAST(N'2014-02-10T13:46:35.770' AS DateTime), 200, 4672, 1005, 200)
      ,(1127, 1, N'1392/11/30', CAST(N'2014-02-23T07:12:01.587' AS DateTime), 100, 4672, 1205, 100)
      ,(1127, 1, N'1392/11/30', CAST(N'2014-02-23T07:12:01.587' AS DateTime), 100, 4672, 1205, 100)
      ,(1127, 2, N'1393/01/20', CAST(N'2014-04-09T10:20:45.827' AS DateTime), 100, 4672, 1105, 100)
      ,(1127, 2, N'1393/02/27', CAST(N'2014-05-17T14:56:28.703' AS DateTime), 100, 4672, 955, 100)
      ,(1127, 2, N'1393/02/27', CAST(N'2014-05-17T14:56:28.703' AS DateTime), 50, 4672, 955, 100)
      ,(1127, 2, N'1393/04/16', CAST(N'2014-07-07T12:11:02.837' AS DateTime), 30, 4672, 925, 30)
      ,(1127, 2, N'1393/04/23', CAST(N'2014-07-14T11:34:51.507' AS DateTime), 20, 4672, 905, 20)
      ,(1127, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 20, 4672, 805, 20)
      ,(1127, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 80, 3238, 805, 20)
      ,(1127, 2, N'1393/04/31', CAST(N'2014-08-19T10:07:18.407' AS DateTime), 10, 4672, 795, 10)
      ,(1127, 2, N'1393/04/23', CAST(N'2014-08-19T11:58:35.883' AS DateTime), 80, 4672, 715, 80)
      ,(1127, 2, N'1393/06/25', CAST(N'2014-09-16T15:21:58.360' AS DateTime), 100, 3238, 615, 100)
      ,(1127, 2, N'1393/07/06', CAST(N'2014-09-28T14:42:19.763' AS DateTime), 20, 3238, 595, 20)
      ,(1127, 1, N'1393/09/05', CAST(N'2014-11-26T13:55:07.697' AS DateTime), 100, 4672, 705, 100)
      ,(1127, 1, N'1393/09/05', CAST(N'2014-11-26T13:55:07.697' AS DateTime), 10, 0, 705, 100)
      ,(1127, 2, N'1393/09/09', CAST(N'2014-11-30T11:28:07.790' AS DateTime), 100, 4672, 595, 100)
      ,(1127, 2, N'1393/09/09', CAST(N'2014-11-30T11:28:07.790' AS DateTime), 10, 0, 595, 100)
      ,(1127, 1, N'1393/09/16', CAST(N'2014-12-07T17:03:06.513' AS DateTime), 100, 4672, 705, 100)
      ,(1127, 1, N'1393/09/16', CAST(N'2014-12-07T17:03:06.513' AS DateTime), 10, 0, 705, 100)
      ,(1127, 1, N'1393/09/18', CAST(N'2014-12-09T15:12:09.530' AS DateTime), 200, 4672, 905, 200)
      ,(1127, 2, N'1393/10/20', CAST(N'2015-01-10T14:12:20.580' AS DateTime), 100, 4672, 805, 100)
      ,(1127, 2, N'1393/10/30', CAST(N'2015-01-21T12:43:14.703' AS DateTime), 15, 2752, 790, 15)
      ,(1127, 1, N'1393/10/30', CAST(N'2015-01-21T16:05:00.070' AS DateTime), 15, 2951, 805, 15)
      ,(1127, 1, N'1393/11/04', CAST(N'2015-01-24T13:02:39.747' AS DateTime), 100, 3238, 905, 100)
      ,(1127, 1, N'1393/11/04', CAST(N'2015-01-24T13:12:58.887' AS DateTime), 100, 3238, 1005, 100)
      ,(1127, 1, N'1393/10/30', CAST(N'2015-01-25T09:54:34.507' AS DateTime), 100, 3238, 1105, 100)
      ,(1127, 1, N'1393/12/04', CAST(N'2015-03-01T14:54:51.287' AS DateTime), 100, 4672, 1215, 100)
      ,(1127, 1, N'1393/12/04', CAST(N'2015-03-01T14:54:51.287' AS DateTime), 10, 0, 1215, 100)
      ,(1127, 2, N'1393/12/12', CAST(N'2015-03-03T15:08:17.223' AS DateTime), 10, 0, 1165, 10)
      ,(1127, 2, N'1393/12/12', CAST(N'2015-03-03T15:08:17.223' AS DateTime), 40, 4672, 1165, 10)
      ,(1127, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 4, 4672, 1152, 4)
      ,(1127, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 4, 4672, 1152, 4)
      ,(1127, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 5, 4672, 1152, 4)
      ,(1127, 1, N'1393/12/29', CAST(N'2015-03-20T12:37:28.313' AS DateTime), 6, 4672, 1158, 6)
      ,(1127, 2, N'1393/12/29', CAST(N'2015-03-20T13:16:11.963' AS DateTime), 53, 2752, 1105, 53)
      ,(1127, 2, N'1393/12/29', CAST(N'2015-03-20T13:55:53.850' AS DateTime), 1, 2752, 1104, 1)
      ,(1127, 2, N'1393/12/29', CAST(N'2015-03-20T15:54:42.020' AS DateTime), 1, 2752, 1103, 1)
      ,(1127, 2, N'1393/12/13', CAST(N'2015-04-08T10:48:37.843' AS DateTime), 160, 4672, 943, 160)
      ,(1127, 2, N'1394/02/09', CAST(N'2015-05-03T13:22:54.430' AS DateTime), 100, 3238, 793, 100)
      ,(1127, 2, N'1394/02/09', CAST(N'2015-05-03T13:22:54.430' AS DateTime), 50, 3238, 793, 100)
      ,(1127, 1, N'1394/02/14', CAST(N'2015-05-04T14:32:56.927' AS DateTime), 300, 5760, 1123, 300)
      ,(1127, 1, N'1394/02/14', CAST(N'2015-05-04T14:32:56.927' AS DateTime), 30, 0, 1123, 300)
      ,(1127, 2, N'1394/03/20', CAST(N'2015-06-10T14:27:44.840' AS DateTime), 150, 5760, 973, 150)
      ,(1127, 1, N'1394/04/01', CAST(N'2015-06-22T10:23:07.797' AS DateTime), 300, 5760, 1333, 300)
      ,(1127, 1, N'1394/04/01', CAST(N'2015-06-22T10:23:07.797' AS DateTime), 60, 0, 1333, 300)
      ,(1127, 2, N'1394/05/14', CAST(N'2015-08-05T11:08:25.653' AS DateTime), 50, 5760, 1283, 50)
      ,(1127, 2, N'1394/04/31', CAST(N'2015-09-15T11:49:59.883' AS DateTime), 5, 3238, 1278, 5)
      ,(1127, 2, N'1394/03/20', CAST(N'2015-09-19T16:21:25.497' AS DateTime), 50, 3238, 1228, 50)
      ,(1127, 2, N'1394/07/06', CAST(N'2015-09-28T14:46:01.050' AS DateTime), 100, 5760, 1028, 100)
      ,(1127, 2, N'1394/07/06', CAST(N'2015-09-28T14:46:01.050' AS DateTime), 30, 0, 1028, 100)
      ,(1127, 2, N'1394/07/06', CAST(N'2015-09-28T14:46:01.050' AS DateTime), 70, 5760, 1028, 100)
      ,(1127, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 5, 5760, 1018, 5)
      ,(1127, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 5, 5760, 1018, 5)
      ,(1127, 2, N'1394/10/14', CAST(N'2016-01-05T13:19:31.810' AS DateTime), 100, 5760, 918, 100)
      ,(1127, 2, N'1394/10/26', CAST(N'2016-01-16T11:08:12.900' AS DateTime), 30, 5760, 818, 30)
      ,(1127, 2, N'1394/10/26', CAST(N'2016-01-16T11:08:12.900' AS DateTime), 60, 0, 818, 30)
      ,(1127, 2, N'1394/10/26', CAST(N'2016-01-16T11:08:12.900' AS DateTime), 10, 4672, 818, 30)
      ,(1127, 2, N'1394/11/21', CAST(N'2016-02-10T15:26:43.957' AS DateTime), 90, 4672, 718, 90)
      ,(1127, 2, N'1394/11/21', CAST(N'2016-02-10T15:26:43.957' AS DateTime), 10, 0, 718, 90)
      ,(1127, 1, N'1394/11/25', CAST(N'2016-02-14T13:38:19.000' AS DateTime), 200, 5760, 918, 200)
      ,(1127, 1, N'1394/12/05', CAST(N'2016-02-24T14:20:46.760' AS DateTime), 100, 5760, 1018, 100)
      ,(1127, 1, N'1394/12/29', CAST(N'2016-03-19T13:12:08.850' AS DateTime), 35, 4672, 1053, 35)
      ,(1127, 1, N'1394/12/29', CAST(N'2016-03-19T13:35:06.550' AS DateTime), 35, 4672, 1088, 35)
      ,(1127, 2, N'1394/12/29', CAST(N'2016-03-19T14:08:26.040' AS DateTime), 9, 3238, 1079, 9)
      ,(1127, 2, N'1394/12/29', CAST(N'2016-03-19T14:24:24.763' AS DateTime), 9, 3238, 1070, 9)
      ,(1127, 2, N'1395/02/01', CAST(N'2016-04-20T12:08:20.833' AS DateTime), 100, 5760, 970, 100)
      ,(1127, 2, N'1395/02/25', CAST(N'2016-05-14T14:08:58.717' AS DateTime), 100, 5760, 870, 100)
      ,(1127, 2, N'1395/03/12', CAST(N'2016-06-01T11:54:25.540' AS DateTime), 100, 5760, 720, 100)
      ,(1127, 2, N'1395/03/12', CAST(N'2016-06-01T11:54:25.540' AS DateTime), 50, 5760, 720, 100)
      ,(1127, 1, N'1395/03/17', CAST(N'2016-06-06T18:19:51.563' AS DateTime), 200, 5760, 940, 200)
      ,(1127, 1, N'1395/03/17', CAST(N'2016-06-06T18:19:51.563' AS DateTime), 20, 0, 940, 200)
      ,(1127, 1, N'1394/03/30', CAST(N'2016-06-13T07:44:44.550' AS DateTime), 100, 5760, 1040, 100)
      ,(1127, 1, N'1395/01/24', CAST(N'2016-06-13T07:44:47.683' AS DateTime), 200, 5760, 1240, 200)
      ,(1127, 1, N'1394/03/30', CAST(N'2016-06-13T07:44:49.543' AS DateTime), 100, 5760, 1340, 100)
      ,(1127, 2, N'1395/01/25', CAST(N'2016-07-05T09:18:33.837' AS DateTime), 10, 5760, 1330, 10)
      ,(1127, 2, N'1395/04/08', CAST(N'2016-07-05T09:18:37.423' AS DateTime), 5, 5760, 1325, 5)
      ,(1127, 2, N'1395/03/12', CAST(N'2016-07-05T11:42:51.043' AS DateTime), 50, 5760, 1275, 50)
      ,(1127, 2, N'1394/11/21', CAST(N'2016-07-05T11:42:52.663' AS DateTime), 50, 5760, 1225, 50)
      ,(1127, 2, N'1395/04/19', CAST(N'2016-07-09T10:59:17.067' AS DateTime), 100, 5760, 1075, 100)
      ,(1127, 2, N'1395/04/19', CAST(N'2016-07-09T10:59:17.067' AS DateTime), 50, 5760, 1075, 100)
      ,(1127, 1, N'1395/04/29', CAST(N'2016-07-19T10:36:57.280' AS DateTime), 300, 5760, 1475, 300)
      ,(1127, 1, N'1395/04/29', CAST(N'2016-07-19T10:36:57.280' AS DateTime), 100, 0, 1475, 300)
      ,(1127, 2, N'1395/08/19', CAST(N'2016-11-09T15:11:02.957' AS DateTime), 5, 5760, 1470, 5)
      ,(1127, 2, N'1395/08/26', CAST(N'2016-11-16T18:32:18.520' AS DateTime), 100, 5760, 1370, 100)
      ,(1127, 2, N'1395/08/21', CAST(N'2016-12-03T11:21:21.813' AS DateTime), 4, 3238, 1351, 4)
      ,(1127, 2, N'1395/08/21', CAST(N'2016-12-03T11:21:21.813' AS DateTime), 15, 3238, 1351, 4)
      ,(1127, 2, N'1392/10/15', CAST(N'2016-12-10T11:19:27.227' AS DateTime), 100, 3238, 1251, 100)
      ,(1127, 2, N'1395/10/25', CAST(N'2017-02-07T14:01:59.080' AS DateTime), 30, 5760, 1221, 30)
      ,(1127, 2, N'1395/12/01', CAST(N'2017-02-19T10:08:10.217' AS DateTime), 100, 5760, 1121, 100)
      ,(1127, 2, N'1395/11/09', CAST(N'2017-03-04T09:34:40.363' AS DateTime), 5, 5760, 1116, 5)
      ,(1127, 2, N'1395/11/09', CAST(N'2017-03-04T09:34:42.650' AS DateTime), 5, 5760, 1106, 5)
      ,(1127, 2, N'1395/11/09', CAST(N'2017-03-04T09:34:42.650' AS DateTime), 5, 5760, 1106, 5)
      ,(1127, 2, N'1395/12/17', CAST(N'2017-03-08T12:56:35.397' AS DateTime), 51, 3238, 1019, 51)
      ,(1127, 2, N'1395/12/17', CAST(N'2017-03-08T12:56:35.397' AS DateTime), 36, 5760, 1019, 51)
      ,(1127, 2, N'1394/08/04', CAST(N'2017-03-12T14:54:42.350' AS DateTime), 100, 5760, 919, 100)
      ,(1127, 2, N'1394/12/22', CAST(N'2017-03-12T15:00:48.380' AS DateTime), 100, 5760, 819, 100)
      ,(1127, 2, N'1395/09/30', CAST(N'2017-03-14T19:17:33.740' AS DateTime), 200, 5760, 619, 200)
      ,(1127, 1, N'1395/12/29', CAST(N'2017-03-19T11:28:34.087' AS DateTime), 4, 5760, 623, 4)
      ,(1127, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 13, 5760, 610, 13)
      ,(1127, 2, N'1396/01/19', CAST(N'2017-04-08T14:59:33.500' AS DateTime), 70, 5760, 530, 70)
      ,(1127, 2, N'1396/01/19', CAST(N'2017-04-08T14:59:33.500' AS DateTime), 10, 0, 530, 70)
      ,(1127, 2, N'1396/01/28', CAST(N'2017-04-17T15:42:13.923' AS DateTime), 10, 0, 520, 10)
      ,(1127, 1, N'1396/02/02', CAST(N'2017-04-22T14:43:34.430' AS DateTime), 400, 7600, 920, 400)
      ,(1127, 1, N'1396/02/02', CAST(N'2017-04-22T16:32:07.493' AS DateTime), 400, 7600, 1400, 400)
      ,(1127, 1, N'1396/02/02', CAST(N'2017-04-22T16:32:07.493' AS DateTime), 80, 0, 1400, 400)
      ,(1127, 2, N'1396/02/12', CAST(N'2017-05-02T16:59:31.077' AS DateTime), 20, 0, 1380, 20)
      ,(1127, 1, N'1396/02/16', CAST(N'2017-05-06T16:09:46.917' AS DateTime), 170, 7600, 1550, 170)
      ,(1127, 2, N'1396/02/13', CAST(N'2017-05-08T14:14:30.887' AS DateTime), 89, 5760, 1459, 89)
      ,(1127, 2, N'1396/02/13', CAST(N'2017-05-08T14:14:30.887' AS DateTime), 2, 5760, 1459, 89)
      ,(1127, 2, N'1396/02/23', CAST(N'2017-05-13T15:55:49.990' AS DateTime), 80, 0, 1359, 80)
      ,(1127, 2, N'1396/02/23', CAST(N'2017-05-13T15:55:49.990' AS DateTime), 20, 7600, 1359, 80)
      ,(1127, 2, N'1396/02/30', CAST(N'2017-05-20T14:21:20.610' AS DateTime), 70, 7600, 1289, 70)
      ,(1127, 2, N'1396/03/17', CAST(N'2017-06-07T12:05:25.207' AS DateTime), 50, 7600, 1239, 50)
      ,(1127, 1, N'1396/03/22', CAST(N'2017-06-12T09:07:26.560' AS DateTime), 5, 7600, 1244, 5)
      ,(1127, 2, N'1396/04/10', CAST(N'2017-07-01T15:20:39.793' AS DateTime), 5, 7600, 1134, 5)
      ,(1127, 2, N'1396/04/10', CAST(N'2017-07-01T15:20:39.793' AS DateTime), 75, 7600, 1134, 5)
      ,(1127, 2, N'1396/04/10', CAST(N'2017-07-01T15:20:39.793' AS DateTime), 30, 7600, 1134, 5)
      ,(1127, 2, N'1396/05/08', CAST(N'2017-07-30T10:59:42.633' AS DateTime), 100, 7600, 1034, 100)
      ,(1127, 2, N'1396/06/11', CAST(N'2017-09-02T14:15:04.643' AS DateTime), 100, 7600, 934, 100)
      ,(1127, 2, N'1396/06/28', CAST(N'2017-09-23T14:51:56.807' AS DateTime), 5, 7600, 929, 5)
      ,(1127, 2, N'1396/07/05', CAST(N'2017-09-27T11:45:41.177' AS DateTime), 100, 7600, 829, 100)
      ,(1127, 1, N'1396/07/27', CAST(N'2017-10-19T10:01:45.503' AS DateTime), 120, 7600, 949, 120)
      ,(1127, 2, N'1396/08/01', CAST(N'2017-10-23T09:55:59.070' AS DateTime), 20, 7600, 929, 20)
      ,(1127, 2, N'1396/08/30', CAST(N'2017-11-21T11:22:35.230' AS DateTime), 5, 7600, 879, 5)
      ,(1127, 2, N'1396/08/30', CAST(N'2017-11-21T11:22:35.230' AS DateTime), 45, 7600, 879, 5)
      ,(1127, 2, N'1396/09/08', CAST(N'2017-11-29T10:39:00.153' AS DateTime), 75, 7600, 779, 75)
      ,(1127, 2, N'1396/09/08', CAST(N'2017-11-29T10:39:00.153' AS DateTime), 25, 7600, 779, 75)
      ,(1127, 2, N'1396/10/04', CAST(N'2017-12-25T14:21:02.423' AS DateTime), 100, 7600, 679, 100)
      ,(1127, 2, N'1396/10/24', CAST(N'2018-01-14T14:18:21.137' AS DateTime), 200, 7600, 479, 200)
      ,(1127, 2, N'1396/10/26', CAST(N'2018-01-16T15:45:21.710' AS DateTime), 50, 7600, 429, 50)
      ,(1127, 1, N'1396/11/01', CAST(N'2018-01-21T08:36:16.423' AS DateTime), 400, 7600, 829, 400)
      ,(1127, 2, N'1396/11/03', CAST(N'2018-01-23T09:48:01.290' AS DateTime), 20, 7600, 809, 20)
      ,(1127, 2, N'1396/11/09', CAST(N'2018-01-29T14:28:04.153' AS DateTime), 5, 7600, 709, 5)
      ,(1127, 2, N'1396/11/09', CAST(N'2018-01-29T14:28:04.153' AS DateTime), 80, 0, 709, 5)
      ,(1127, 2, N'1396/11/09', CAST(N'2018-01-29T14:28:04.153' AS DateTime), 15, 7600, 709, 5)
      ,(1127, 2, N'1396/12/20', CAST(N'2018-03-12T08:17:10.880' AS DateTime), 5, 7600, 704, 5)
      ,(1127, 2, N'1396/12/20', CAST(N'2018-03-12T08:17:14.940' AS DateTime), 5, 7600, 699, 5)
      ,(1127, 1, N'1396/12/26', CAST(N'2018-03-17T16:29:21.260' AS DateTime), 5, 7600, 704, 5)
      ,(1127, 2, N'1396/12/27', CAST(N'2018-03-18T15:17:55.400' AS DateTime), 3, 7600, 701, 3)
      ,(1127, 2, N'1396/12/28', CAST(N'2018-03-19T11:38:06.520' AS DateTime), 31, 7600, 670, 31)
      ,(1127, 2, N'1397/03/28', CAST(N'2018-06-18T14:34:02.587' AS DateTime), 100, 7600, 570, 100)
      ,(1127, 1, N'1397/04/27', CAST(N'2018-07-18T08:53:45.867' AS DateTime), 620, 8208, 1190, 620)
      ,(1127, 2, N'1397/02/04', CAST(N'2018-08-19T09:56:37.423' AS DateTime), 4, 7600, 1186, 4)
      ,(1127, 2, N'1397/05/28', CAST(N'2018-08-19T09:56:43.077' AS DateTime), 5, 7600, 1181, 5)
      ,(1127, 2, N'1397/06/04', CAST(N'2018-08-26T14:31:49.900' AS DateTime), 80, 8208, 1101, 80)
      ,(1127, 2, N'1397/06/07', CAST(N'2018-08-29T11:04:48.817' AS DateTime), 40, 8208, 1061, 40)
      ,(1127, 1, N'1397/06/10', CAST(N'2018-09-01T07:43:57.117' AS DateTime), 300, 8208, 1361, 300)
      ,(1127, 1, N'1397/06/20', CAST(N'2018-09-11T07:19:32.493' AS DateTime), 480, 8208, 1841, 480)
      ,(1128, 1, N'1392/06/11', CAST(N'2013-09-03T00:33:05.280' AS DateTime), 100, 6557, 100, 100)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.717' AS DateTime), 40, 4535, 142, 40)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.717' AS DateTime), 2, 4535, 142, 40)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.733' AS DateTime), 20, 4535, 162, 20)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.750' AS DateTime), 50, 4535, 252, 50)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:37.750' AS DateTime), 40, 4535, 252, 50)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-09-25T14:04:05.513' AS DateTime), 5, 6462, 257, 5)
      ,(1128, 2, N'1392/07/17', CAST(N'2013-10-12T11:54:49.947' AS DateTime), 30, 6557, 227, 30)
      ,(1128, 2, N'1392/07/17', CAST(N'2013-10-12T11:55:42.560' AS DateTime), 100, 6557, 127, 100)
      ,(1128, 2, N'1392/08/05', CAST(N'2013-10-27T13:49:52.033' AS DateTime), 150, 6557, -23, 150)
      ,(1128, 1, N'1392/06/10', CAST(N'2013-10-27T19:20:14.250' AS DateTime), 90, 6462, 67, 90)
      ,(1128, 2, N'1392/08/05', CAST(N'2013-10-28T08:32:46.880' AS DateTime), 30, 6557, 37, 30)
      ,(1128, 1, N'1392/08/13', CAST(N'2013-11-04T15:01:46.043' AS DateTime), 480, 6557, 517, 480)
      ,(1128, 2, N'1392/08/19', CAST(N'2013-11-10T14:37:44.603' AS DateTime), 100, 6557, 417, 100)
      ,(1128, 2, N'1392/09/10', CAST(N'2013-12-01T11:09:28.607' AS DateTime), 10, 6557, 57, 10)
      ,(1128, 2, N'1392/09/10', CAST(N'2013-12-01T11:09:28.607' AS DateTime), 350, 6557, 57, 10)
      ,(1128, 2, N'1392/09/11', CAST(N'2013-12-02T16:55:05.593' AS DateTime), 80, 6557, -23, 80)
      ,(1128, 2, N'1392/07/29', CAST(N'2014-01-14T14:17:50.213' AS DateTime), 50, 6557, -73, 50)
      ,(1128, 1, N'1392/06/11', CAST(N'2014-01-15T20:20:44.537' AS DateTime), 420, 6557, 347, 420)
      ,(1128, 2, N'1392/10/30', CAST(N'2014-01-20T10:53:21.203' AS DateTime), 1, 6462, 346, 1)
      ,(1128, 1, N'1392/10/30', CAST(N'2014-01-20T15:14:12.447' AS DateTime), 11, 4535, 357, 11)
      ,(1128, 2, N'1392/10/30', CAST(N'2014-01-21T15:09:59.797' AS DateTime), 8, 6462, 349, 8)
      ,(1128, 2, N'1392/11/07', CAST(N'2014-01-27T14:35:12.293' AS DateTime), 50, 6557, 299, 50)
      ,(1128, 1, N'1392/11/21', CAST(N'2014-02-10T13:46:35.770' AS DateTime), 100, 6557, 399, 100)
      ,(1128, 2, N'1392/12/04', CAST(N'2014-02-23T14:25:24.177' AS DateTime), 10, 6557, 389, 10)
      ,(1128, 1, N'1392/12/27', CAST(N'2014-03-18T11:47:12.790' AS DateTime), 500, 6557, 889, 500)
      ,(1128, 2, N'1392/12/26', CAST(N'2014-03-18T16:07:32.000' AS DateTime), 40, 6557, 849, 40)
      ,(1128, 2, N'1393/01/09', CAST(N'2014-03-30T07:15:28.060' AS DateTime), 150, 6557, 699, 150)
      ,(1128, 2, N'1393/01/16', CAST(N'2014-04-05T08:04:45.457' AS DateTime), 20, 6557, 679, 20)
      ,(1128, 2, N'1393/01/18', CAST(N'2014-04-08T12:07:35.310' AS DateTime), 50, 6557, 629, 50)
      ,(1128, 2, N'1393/01/24', CAST(N'2014-04-14T11:00:41.853' AS DateTime), 50, 6557, 579, 50)
      ,(1128, 2, N'1393/02/27', CAST(N'2014-05-17T14:56:28.703' AS DateTime), 100, 6557, 479, 100)
      ,(1128, 2, N'1393/03/05', CAST(N'2014-05-26T15:38:26.853' AS DateTime), 30, 6557, 449, 30)
      ,(1128, 1, N'1393/03/12', CAST(N'2014-06-02T14:05:04.737' AS DateTime), 200, 6557, 649, 200)
      ,(1128, 2, N'1393/03/26', CAST(N'2014-06-17T14:53:51.500' AS DateTime), 100, 6557, 549, 100)
      ,(1128, 2, N'1393/03/28', CAST(N'2014-06-18T10:23:46.047' AS DateTime), 50, 6557, 499, 50)
      ,(1128, 1, N'1393/04/07', CAST(N'2014-06-28T14:11:24.197' AS DateTime), 100, 6557, 599, 100)
      ,(1128, 2, N'1393/04/09', CAST(N'2014-07-01T07:25:22.313' AS DateTime), 60, 6557, 539, 60)
      ,(1128, 1, N'1393/04/22', CAST(N'2014-07-13T09:21:17.087' AS DateTime), 100, 6557, 639, 100)
      ,(1128, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 90, 6557, 449, 90)
      ,(1128, 2, N'1393/05/01', CAST(N'2014-07-23T15:39:40.763' AS DateTime), 100, 6557, 449, 90)
      ,(1128, 2, N'1393/05/20', CAST(N'2014-08-11T15:03:27.533' AS DateTime), 50, 6557, 399, 50)
      ,(1128, 2, N'1393/07/06', CAST(N'2014-09-28T14:42:19.763' AS DateTime), 30, 6557, 369, 30)
      ,(1128, 2, N'1393/08/04', CAST(N'2014-10-26T22:36:43.973' AS DateTime), 100, 6557, 269, 100)
      ,(1128, 2, N'1393/08/05', CAST(N'2014-10-27T16:40:48.720' AS DateTime), 30, 6557, 239, 30)
      ,(1128, 1, N'1393/08/10', CAST(N'2014-11-01T09:29:19.420' AS DateTime), 300, 6557, 539, 300)
      ,(1128, 1, N'1393/08/18', CAST(N'2014-11-09T17:06:10.080' AS DateTime), 100, 6557, 639, 100)
      ,(1128, 2, N'1393/09/09', CAST(N'2014-11-30T11:28:07.790' AS DateTime), 200, 6557, 439, 200)
      ,(1128, 2, N'1393/09/25', CAST(N'2014-12-17T16:04:18.903' AS DateTime), 100, 6557, 339, 100)
      ,(1128, 2, N'1393/10/15', CAST(N'2015-01-05T14:30:20.563' AS DateTime), 80, 6557, 259, 80)
      ,(1128, 2, N'1393/10/30', CAST(N'2015-01-21T12:43:14.703' AS DateTime), 6, 6462, 253, 6)
      ,(1128, 1, N'1393/10/30', CAST(N'2015-01-21T16:05:00.070' AS DateTime), 11, 4535, 264, 11)
      ,(1128, 2, N'1393/11/04', CAST(N'2015-01-24T13:02:39.810' AS DateTime), 100, 6557, 164, 100)
      ,(1128, 2, N'1393/10/30', CAST(N'2015-01-25T09:54:35.977' AS DateTime), 100, 6557, 64, 100)
      ,(1128, 1, N'1393/11/11', CAST(N'2015-01-31T10:40:39.250' AS DateTime), 200, 6557, 264, 200)
      ,(1128, 2, N'1393/12/10', CAST(N'2015-03-02T11:56:03.697' AS DateTime), 20, 6557, 164, 20)
      ,(1128, 2, N'1393/12/10', CAST(N'2015-03-02T11:56:03.697' AS DateTime), 80, 6557, 164, 20)
      ,(1128, 1, N'1393/12/29', CAST(N'2015-03-20T12:37:28.313' AS DateTime), 9, 4535, 173, 9)
      ,(1128, 2, N'1393/12/29', CAST(N'2015-03-20T13:16:11.963' AS DateTime), 151, 6557, 22, 151)
      ,(1128, 2, N'1393/12/29', CAST(N'2015-03-20T13:55:53.850' AS DateTime), 2, 6557, 20, 2)
      ,(1128, 1, N'1393/12/29', CAST(N'2015-03-20T15:54:41.177' AS DateTime), 3, 6557, 23, 3)
      ,(1128, 1, N'1394/01/26', CAST(N'2015-04-15T15:38:20.880' AS DateTime), 200, 8000, 223, 200)
      ,(1128, 2, N'1394/02/23', CAST(N'2015-05-13T17:04:13.937' AS DateTime), 120, 6557, 23, 120)
      ,(1128, 2, N'1394/02/23', CAST(N'2015-05-13T17:04:13.937' AS DateTime), 80, 8000, 23, 120)
      ,(1128, 1, N'1394/03/09', CAST(N'2015-05-31T11:34:05.680' AS DateTime), 200, 8000, 223, 200)
      ,(1128, 2, N'1394/06/22', CAST(N'2015-09-13T11:38:44.467' AS DateTime), 40, 8000, 183, 40)
      ,(1128, 2, N'1394/06/21', CAST(N'2015-09-13T13:55:04.413' AS DateTime), 100, 8000, 83, 100)
      ,(1128, 2, N'1394/10/14', CAST(N'2016-01-05T13:19:31.810' AS DateTime), 50, 8000, -17, 50)
      ,(1128, 2, N'1394/10/14', CAST(N'2016-01-05T13:19:31.810' AS DateTime), 10, 8000, -17, 50)
      ,(1128, 2, N'1394/10/14', CAST(N'2016-01-05T13:19:31.810' AS DateTime), 20, 8000, -17, 50)
      ,(1128, 2, N'1394/10/14', CAST(N'2016-01-05T13:19:31.810' AS DateTime), 20, 6557, -17, 50)
      ,(1128, 2, N'1394/11/18', CAST(N'2016-02-07T15:30:16.560' AS DateTime), 20, 6557, -117, 20)
      ,(1128, 2, N'1394/11/18', CAST(N'2016-02-07T15:30:16.560' AS DateTime), 80, 6557, -117, 20)
      ,(1128, 1, N'1393/04/15', CAST(N'2016-02-08T09:31:33.587' AS DateTime), 200, 6557, 83, 200)
      ,(1128, 2, N'1394/12/29', CAST(N'2016-03-19T13:12:08.893' AS DateTime), 3, 6557, 80, 3)
      ,(1128, 2, N'1394/12/29', CAST(N'2016-03-19T13:35:06.773' AS DateTime), 3, 6557, 77, 3)
      ,(1128, 2, N'1394/12/29', CAST(N'2016-03-19T14:08:26.040' AS DateTime), 1, 6557, 76, 1)
      ,(1128, 2, N'1394/12/29', CAST(N'2016-03-19T14:24:24.763' AS DateTime), 1, 6557, 75, 1)
      ,(1128, 2, N'1395/01/14', CAST(N'2016-04-02T15:28:28.047' AS DateTime), 20, 6557, 25, 20)
      ,(1128, 2, N'1395/01/14', CAST(N'2016-04-02T15:28:28.047' AS DateTime), 10, 8000, 25, 20)
      ,(1128, 2, N'1395/01/14', CAST(N'2016-04-02T15:28:28.047' AS DateTime), 20, 8000, 25, 20)
      ,(1128, 1, N'1393/04/05', CAST(N'2016-04-06T09:20:58.260' AS DateTime), 100, 6557, 125, 100)
      ,(1128, 1, N'1394/04/01', CAST(N'2016-04-06T09:20:58.820' AS DateTime), 200, 8000, 325, 200)
      ,(1128, 1, N'1394/01/23', CAST(N'2016-04-06T09:20:59.063' AS DateTime), 30, 8000, 355, 30)
      ,(1128, 1, N'1395/01/26', CAST(N'2016-04-14T11:52:44.613' AS DateTime), 200, 8000, 555, 200)
      ,(1128, 2, N'1395/02/20', CAST(N'2016-05-10T17:16:23.657' AS DateTime), 50, 8000, 455, 50)
      ,(1128, 2, N'1395/02/20', CAST(N'2016-05-10T17:16:23.657' AS DateTime), 50, 6557, 455, 50)
      ,(1128, 2, N'1395/02/25', CAST(N'2016-05-14T14:08:58.717' AS DateTime), 50, 6557, 405, 50)
      ,(1128, 1, N'1395/03/01', CAST(N'2016-05-21T09:17:30.560' AS DateTime), 100, 8000, 505, 100)
      ,(1128, 1, N'1395/03/01', CAST(N'2016-05-21T10:13:24.150' AS DateTime), 100, 8000, 605, 100)
      ,(1128, 2, N'1395/01/14', CAST(N'2016-06-13T07:44:49.100' AS DateTime), 150, 8000, 455, 150)
      ,(1128, 2, N'1395/03/30', CAST(N'2016-06-19T14:26:20.950' AS DateTime), 100, 8000, 355, 100)
      ,(1128, 2, N'1395/03/23', CAST(N'2016-08-01T14:07:48.277' AS DateTime), 10, 8000, 310, 10)
      ,(1128, 2, N'1395/03/23', CAST(N'2016-08-01T14:07:48.277' AS DateTime), 1, 6557, 310, 10)
      ,(1128, 2, N'1395/03/23', CAST(N'2016-08-01T14:07:48.277' AS DateTime), 20, 6557, 310, 10)
      ,(1128, 2, N'1395/03/23', CAST(N'2016-08-01T14:07:48.277' AS DateTime), 14, 6557, 310, 10)
      ,(1128, 2, N'1393/06/24', CAST(N'2016-08-03T12:09:56.720' AS DateTime), 50, 6557, 260, 50)
      ,(1128, 2, N'1393/07/07', CAST(N'2016-08-03T12:10:01.067' AS DateTime), 30, 6557, 230, 30)
      ,(1128, 2, N'1393/07/07', CAST(N'2016-08-03T12:10:02.900' AS DateTime), 20, 6557, 210, 20)
      ,(1128, 2, N'1394/02/29', CAST(N'2016-08-03T12:10:04.837' AS DateTime), 100, 8000, 110, 100)
      ,(1128, 2, N'1395/05/24', CAST(N'2016-08-14T14:58:01.070' AS DateTime), 100, 8000, -10, 100)
      ,(1128, 2, N'1395/05/24', CAST(N'2016-08-14T14:58:01.070' AS DateTime), 20, 8000, -10, 100)
      ,(1128, 1, N'1395/06/02', CAST(N'2016-08-23T10:30:03.360' AS DateTime), 200, 9600, 190, 200)
      ,(1128, 2, N'1395/06/27', CAST(N'2016-09-17T13:24:10.353' AS DateTime), 80, 8000, 110, 80)
      ,(1128, 2, N'1395/08/02', CAST(N'2016-10-24T08:12:36.707' AS DateTime), 70, 8000, 40, 70)
      ,(1128, 1, N'1395/08/10', CAST(N'2016-10-31T14:06:30.490' AS DateTime), 200, 9600, 240, 200)
      ,(1128, 2, N'1395/08/11', CAST(N'2016-11-02T09:08:02.420' AS DateTime), 30, 8000, 190, 30)
      ,(1128, 2, N'1395/08/11', CAST(N'2016-11-02T09:08:02.420' AS DateTime), 20, 9600, 190, 30)
      ,(1128, 2, N'1395/08/26', CAST(N'2016-11-16T18:32:18.520' AS DateTime), 40, 9600, 110, 40)
      ,(1128, 2, N'1395/08/26', CAST(N'2016-11-16T18:32:18.520' AS DateTime), 40, 9600, 110, 40)
      ,(1128, 2, N'1395/09/13', CAST(N'2016-12-03T10:34:41.523' AS DateTime), 50, 9600, 60, 50)
      ,(1128, 2, N'1395/12/09', CAST(N'2017-02-28T17:27:27.240' AS DateTime), 70, 9600, -10, 70)
      ,(1128, 1, N'1395/09/03', CAST(N'2017-03-11T14:38:49.783' AS DateTime), 300, 9600, 290, 300)
      ,(1128, 2, N'1395/12/09', CAST(N'2017-03-11T17:40:47.517' AS DateTime), 10, 9600, 280, 10)
      ,(1128, 2, N'1395/08/26', CAST(N'2017-03-12T14:50:35.277' AS DateTime), 140, 9600, 140, 140)
      ,(1128, 2, N'1395/10/04', CAST(N'2017-03-12T14:54:57.897' AS DateTime), 100, 9600, 40, 100)
      ,(1128, 1, N'1395/12/29', CAST(N'2017-03-19T11:28:34.087' AS DateTime), 7, 9600, 47, 7)
      ,(1128, 1, N'1395/12/29', CAST(N'2017-03-19T12:29:01.183' AS DateTime), 8, 9600, 55, 8)
      ,(1128, 2, N'1396/01/20', CAST(N'2017-04-09T14:36:33.277' AS DateTime), 60, 9600, -5, 60)
      ,(1128, 1, N'1396/01/26', CAST(N'2017-04-15T09:33:48.380' AS DateTime), 200, 9600, 195, 200)
      ,(1128, 2, N'1396/01/28', CAST(N'2017-04-17T15:42:13.923' AS DateTime), 80, 9600, 115, 80)
      ,(1128, 1, N'1396/02/09', CAST(N'2017-04-29T15:11:47.487' AS DateTime), 480, 9600, 635, 480)
      ,(1128, 1, N'1396/02/09', CAST(N'2017-04-29T15:11:47.487' AS DateTime), 40, 0, 635, 480)
      ,(1128, 2, N'1396/02/12', CAST(N'2017-05-02T16:59:31.077' AS DateTime), 20, 9600, 615, 20)
      ,(1128, 2, N'1396/02/17', CAST(N'2017-05-07T11:11:38.363' AS DateTime), 100, 9600, 515, 100)
      ,(1128, 2, N'1396/02/30', CAST(N'2017-05-20T14:21:20.610' AS DateTime), 50, 9600, 465, 50)
      ,(1128, 2, N'1396/03/17', CAST(N'2017-06-07T12:05:25.207' AS DateTime), 20, 9600, 435, 20)
      ,(1128, 2, N'1396/03/17', CAST(N'2017-06-07T12:05:25.207' AS DateTime), 10, 9600, 435, 20)
      ,(1128, 2, N'1396/04/10', CAST(N'2017-07-01T15:20:44.800' AS DateTime), 100, 9600, 335, 100)
      ,(1128, 2, N'1396/04/21', CAST(N'2017-07-12T11:32:36.630' AS DateTime), 100, 9600, 235, 100)
      ,(1128, 2, N'1396/06/28', CAST(N'2017-09-19T12:03:39.460' AS DateTime), 100, 9600, 135, 100)
      ,(1128, 2, N'1396/07/25', CAST(N'2017-10-17T15:16:47.870' AS DateTime), 100, 9600, 35, 100)
      ,(1128, 1, N'1396/07/29', CAST(N'2017-10-21T08:56:28.553' AS DateTime), 480, 9600, 555, 480)
      ,(1128, 1, N'1396/07/29', CAST(N'2017-10-21T08:56:28.553' AS DateTime), 40, 0, 555, 480)
      ,(1128, 2, N'1396/08/01', CAST(N'2017-10-23T09:55:59.070' AS DateTime), 50, 9600, 505, 50)
      ,(1128, 2, N'1396/08/24', CAST(N'2017-11-15T14:31:11.557' AS DateTime), 20, 9600, 455, 20)
      ,(1128, 2, N'1396/08/24', CAST(N'2017-11-15T14:31:11.557' AS DateTime), 30, 0, 455, 20)
      ,(1128, 2, N'1396/10/09', CAST(N'2017-12-30T15:03:19.837' AS DateTime), 10, 0, 355, 10)
      ,(1128, 2, N'1396/10/09', CAST(N'2017-12-30T15:03:19.837' AS DateTime), 90, 9600, 355, 10)
      ,(1128, 2, N'1396/10/27', CAST(N'2018-01-17T11:28:58.973' AS DateTime), 100, 9600, 255, 100)
      ,(1128, 2, N'1396/11/09', CAST(N'2018-01-29T14:28:04.153' AS DateTime), 50, 9600, 205, 50)
      ,(1128, 2, N'1396/12/02', CAST(N'2018-02-21T15:09:05.670' AS DateTime), 50, 9600, 155, 50)
      ,(1128, 1, N'1396/12/27', CAST(N'2018-03-18T15:17:55.157' AS DateTime), 7, 9600, 162, 7)
      ,(1128, 1, N'1396/12/28', CAST(N'2018-03-19T11:38:06.113' AS DateTime), 3, 9600, 165, 3)
      ,(1128, 2, N'1397/01/14', CAST(N'2018-04-03T12:27:27.360' AS DateTime), 100, 9600, 65, 100)
      ,(1128, 1, N'1397/01/19', CAST(N'2018-04-08T08:00:37.980' AS DateTime), 100, 9600, 175, 100)
      ,(1128, 1, N'1397/01/19', CAST(N'2018-04-08T08:00:37.980' AS DateTime), 10, 0, 175, 100)
      ,(1128, 2, N'1397/01/19', CAST(N'2018-04-08T16:09:52.363' AS DateTime), 80, 9600, 95, 80)
      ,(1128, 1, N'1397/01/19', CAST(N'2018-04-08T16:53:20.813' AS DateTime), 100, 9600, 195, 100)
      ,(1128, 2, N'1397/01/26', CAST(N'2018-04-15T15:19:06.040' AS DateTime), 10, 9600, 145, 10)
      ,(1128, 2, N'1397/01/26', CAST(N'2018-04-15T15:19:06.040' AS DateTime), 40, 0, 145, 10)
      ,(1128, 2, N'1397/03/29', CAST(N'2018-06-19T14:18:06.737' AS DateTime), 100, 9600, 45, 100)
      ,(1128, 1, N'1397/04/02', CAST(N'2018-06-23T08:47:45.980' AS DateTime), 420, 10553, 465, 420)
      ,(1128, 2, N'1397/05/28', CAST(N'2018-08-19T09:56:43.077' AS DateTime), 10, 9600, 455, 10)
      ,(1128, 2, N'1397/06/07', CAST(N'2018-08-29T11:04:48.817' AS DateTime), 40, 9600, 415, 40)
      ,(1128, 2, N'1397/06/14', CAST(N'2018-09-05T15:19:47.067' AS DateTime), 60, 9600, 315, 60)
      ,(1128, 2, N'1397/06/14', CAST(N'2018-09-05T15:19:47.067' AS DateTime), 10, 0, 315, 60)
      ,(1128, 2, N'1397/06/14', CAST(N'2018-09-05T15:19:47.067' AS DateTime), 30, 10553, 315, 60)
      ,(1128, 1, N'1397/06/20', CAST(N'2018-09-11T07:19:32.493' AS DateTime), 220, 10367, 795, 220)
      ,(1128, 1, N'1397/06/20', CAST(N'2018-09-11T07:19:32.493' AS DateTime), 200, 10367, 795, 220)
      ,(1128, 1, N'1397/06/20', CAST(N'2018-09-11T07:19:32.493' AS DateTime), 60, 10367, 795, 220)
      ,(1128, 1, N'1397/07/09', CAST(N'2018-10-01T07:55:33.640' AS DateTime), 180, 10367, 995, 180)
      ,(1128, 1, N'1397/07/09', CAST(N'2018-10-01T07:55:33.640' AS DateTime), 20, 10367, 995, 180)
      ,(1131, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:58.733' AS DateTime), 40, 5246, 40, 40)
      ,(1131, 2, N'1393/11/04', CAST(N'2015-01-24T13:02:39.810' AS DateTime), 40, 5246, 0, 40)
      ,(1131, 2, N'1394/04/20', CAST(N'2015-07-11T16:19:54.540' AS DateTime), 40, 5246, -40, 40)
      ,(1152, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:35.403' AS DateTime), 29, 2787, 29, 29)
      ,(1152, 2, N'1392/08/20', CAST(N'2013-11-11T09:25:25.190' AS DateTime), 29, 2787, 0, 29)
      ,(1152, 1, N'1393/12/27', CAST(N'2015-03-18T13:34:00.843' AS DateTime), 70, 0, 70, 70)
      ,(1152, 2, N'1394/06/22', CAST(N'2015-09-14T10:57:45.037' AS DateTime), 10, 2787, 60, 10)
      ,(1152, 2, N'1394/09/17', CAST(N'2015-12-19T14:57:07.267' AS DateTime), 10, 2787, 40, 10)
      ,(1152, 2, N'1394/09/17', CAST(N'2015-12-19T14:57:07.267' AS DateTime), 10, 2787, 40, 10)
      ,(1152, 1, N'1392/10/30', CAST(N'2016-01-13T14:08:36.537' AS DateTime), 20, 2787, 60, 20)
      ,(1152, 1, N'1393/10/30', CAST(N'2016-01-13T14:08:38.410' AS DateTime), 10, 2787, 70, 10)
      ,(1156, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:30.687' AS DateTime), 20, 3934, 20, 20)
      ,(1156, 2, N'1393/03/25', CAST(N'2014-06-24T11:20:26.220' AS DateTime), 70, 3934, -50, 70)
      ,(1156, 1, N'1392/06/10', CAST(N'2014-08-16T12:12:06.150' AS DateTime), 110, 3934, 60, 110)
      ,(1157, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.840' AS DateTime), 30, 4590, 30, 30)
      ,(1157, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.857' AS DateTime), 10, 4590, 40, 10)
      ,(1157, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.873' AS DateTime), 40, 4590, 80, 40)
      ,(1157, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:57.890' AS DateTime), 50, 4590, 130, 50)
      ,(1157, 2, N'1392/08/25', CAST(N'2013-11-16T15:02:46.493' AS DateTime), 50, 4590, 80, 50)
      ,(1157, 1, N'1392/09/21', CAST(N'2013-12-12T10:11:21.590' AS DateTime), 20, 7377, 100, 20)
      ,(1157, 2, N'1392/10/25', CAST(N'2014-01-15T08:45:00.553' AS DateTime), 40, 4590, 60, 40)
      ,(1157, 2, N'1392/11/16', CAST(N'2014-02-05T14:10:08.190' AS DateTime), 10, 4590, 20, 10)
      ,(1157, 2, N'1392/11/16', CAST(N'2014-02-05T14:10:08.190' AS DateTime), 30, 4590, 20, 10)
      ,(1157, 2, N'1393/01/27', CAST(N'2014-04-16T13:59:30.277' AS DateTime), 10, 7377, 10, 10)
      ,(1157, 1, N'1393/02/03', CAST(N'2014-04-23T14:55:15.813' AS DateTime), 100, 7377, 110, 100)
      ,(1157, 2, N'1393/02/14', CAST(N'2014-05-04T12:25:02.870' AS DateTime), 10, 7377, 60, 10)
      ,(1157, 2, N'1393/02/14', CAST(N'2014-05-04T12:25:02.870' AS DateTime), 40, 7377, 60, 10)
      ,(1157, 2, N'1393/03/26', CAST(N'2014-06-17T14:53:51.500' AS DateTime), 30, 7377, 30, 30)
      ,(1157, 2, N'1393/04/02', CAST(N'2014-06-23T11:49:38.537' AS DateTime), 20, 7377, 10, 20)
      ,(1157, 1, N'1393/04/05', CAST(N'2014-06-26T10:41:50.080' AS DateTime), 100, 7377, 110, 100)
      ,(1157, 1, N'1393/04/07', CAST(N'2014-06-28T14:11:24.197' AS DateTime), 40, 7377, 150, 40)
      ,(1157, 2, N'1393/05/20', CAST(N'2014-08-11T15:03:32.357' AS DateTime), 10, 7377, 70, 10)
      ,(1157, 2, N'1393/05/20', CAST(N'2014-08-11T15:03:32.357' AS DateTime), 40, 7377, 70, 10)
      ,(1157, 2, N'1393/05/20', CAST(N'2014-08-11T15:03:32.357' AS DateTime), 30, 7377, 70, 10)
      ,(1157, 1, N'1393/08/03', CAST(N'2014-10-25T14:09:35.893' AS DateTime), 100, 7787, 170, 100)
      ,(1157, 1, N'1393/09/05', CAST(N'2014-11-26T13:55:07.697' AS DateTime), 330, 7787, 500, 330)
      ,(1157, 2, N'1393/09/09', CAST(N'2014-11-30T11:28:07.790' AS DateTime), 70, 7377, 400, 70)
      ,(1157, 2, N'1393/09/09', CAST(N'2014-11-30T11:28:07.790' AS DateTime), 30, 7787, 400, 70)
      ,(1157, 2, N'1393/10/30', CAST(N'2015-01-21T16:05:01.287' AS DateTime), 1, 4590, 399, 1)
      ,(1157, 2, N'1393/12/17', CAST(N'2015-03-08T14:44:23.110' AS DateTime), 100, 7787, 299, 100)
      ,(1157, 2, N'1393/12/29', CAST(N'2015-03-20T12:37:29.760' AS DateTime), 8, 7787, 291, 8)
      ,(1157, 2, N'1394/05/17', CAST(N'2015-08-08T11:34:32.177' AS DateTime), 100, 7787, 191, 100)
      ,(1157, 2, N'1394/12/09', CAST(N'2016-02-29T10:41:44.297' AS DateTime), 100, 7787, 91, 100)
      ,(1157, 1, N'1394/12/29', CAST(N'2016-03-19T13:12:08.850' AS DateTime), 6, 7787, 97, 6)
      ,(1157, 1, N'1394/12/29', CAST(N'2016-03-19T13:35:06.550' AS DateTime), 6, 7787, 103, 6)
      ,(1157, 1, N'1395/06/09', CAST(N'2016-08-30T14:25:59.170' AS DateTime), 100, 7787, 233, 100)
      ,(1157, 1, N'1395/06/09', CAST(N'2016-08-30T14:25:59.170' AS DateTime), 30, 0, 233, 100)
      ,(1157, 2, N'1395/06/07', CAST(N'2017-03-11T17:43:28.743' AS DateTime), 100, 7787, 133, 100)
      ,(1157, 2, N'1395/12/29', CAST(N'2017-03-19T12:29:01.477' AS DateTime), 8, 7787, 125, 8)
      ,(1157, 2, N'1396/01/27', CAST(N'2017-04-16T11:25:55.680' AS DateTime), 50, 7787, 75, 50)
      ,(1157, 2, N'1396/01/27', CAST(N'2017-04-23T14:16:17.167' AS DateTime), 15, 7787, 60, 15)
      ,(1157, 2, N'1396/05/09', CAST(N'2017-07-31T15:23:09.157' AS DateTime), 50, 7787, -20, 50)
      ,(1157, 2, N'1396/05/09', CAST(N'2017-07-31T15:23:09.157' AS DateTime), 30, 0, -20, 50)
      ,(1157, 1, N'1396/05/14', CAST(N'2017-08-05T09:01:46.670' AS DateTime), 100, 8800, 90, 100)
      ,(1157, 1, N'1396/05/14', CAST(N'2017-08-05T09:01:46.670' AS DateTime), 10, 0, 90, 100)
      ,(1157, 2, N'1396/07/10', CAST(N'2017-10-02T14:48:08.360' AS DateTime), 50, 8800, 40, 50)
      ,(1157, 2, N'1396/07/30', CAST(N'2017-10-31T13:51:21.700' AS DateTime), 38, 7787, -34, 38)
      ,(1157, 2, N'1396/07/30', CAST(N'2017-10-31T13:51:21.700' AS DateTime), 30, 0, -34, 38)
      ,(1157, 2, N'1396/07/30', CAST(N'2017-10-31T13:51:21.700' AS DateTime), 6, 8800, -34, 38)
      ,(1157, 2, N'1396/09/22', CAST(N'2017-12-13T11:24:59.720' AS DateTime), 50, 8800, -84, 50)
      ,(1157, 1, N'1396/10/02', CAST(N'2017-12-23T15:43:42.530' AS DateTime), 100, 8800, 16, 100)
      ,(1157, 2, N'1396/12/15', CAST(N'2018-03-06T11:21:29.683' AS DateTime), 10, 0, -84, 10)
      ,(1157, 2, N'1396/12/15', CAST(N'2018-03-06T11:21:29.683' AS DateTime), 90, 8800, -84, 10)
      ,(1157, 2, N'1396/12/28', CAST(N'2018-03-19T11:38:06.520' AS DateTime), 12, 8800, -96, 12)
      ,(1157, 1, N'1397/01/19', CAST(N'2018-04-08T08:00:37.980' AS DateTime), 100, 8800, 4, 100)
      ,(1157, 2, N'1397/02/23', CAST(N'2018-05-13T15:36:55.317' AS DateTime), 10, 8800, -46, 10)
      ,(1157, 2, N'1397/02/23', CAST(N'2018-05-13T15:36:55.317' AS DateTime), 40, 8800, -46, 10)
      ,(1157, 2, N'1397/05/16', CAST(N'2018-08-07T12:04:05.680' AS DateTime), 50, 8800, -96, 50)
      ,(1157, 1, N'1397/06/05', CAST(N'2018-08-27T07:52:10.417' AS DateTime), 200, 10656, 104, 200)
      ,(1161, 1, N'1392/06/11', CAST(N'2013-09-03T00:32:55.920' AS DateTime), 10, 8340, 10, 10)
      ,(1161, 1, N'1392/06/10', CAST(N'2013-09-03T07:12:35.623' AS DateTime), 16, 8197, 26, 16)
      ,(1161, 1, N'1392/06/10', CAST(N'2013-09-25T14:04:06.590' AS DateTime), 1, 6409, 27, 1)
      ,(1161, 2, N'1392/09/04', CAST(N'2013-11-25T09:27:29.963' AS DateTime), 10, 8197, 17, 10)
      ,(1161, 1, N'1392/10/16', CAST(N'2014-01-06T15:33:52.823' AS DateTime), 20, 11475, 37, 20)
      ,(1161, 2, N'1392/10/16', CAST(N'2014-01-14T14:18:33.743' AS DateTime), 10, 8340, 27, 10)
      ,(1161, 1, N'1392/06/11', CAST(N'2014-01-15T20:20:42.180' AS DateTime), 220, 8340, 247, 220)
      ,(1161, 2, N'1392/10/30', CAST(N'2014-01-20T15:14:13.947' AS DateTime), 3, 8197, 244, 3)
      ,(1161, 2, N'1392/10/30', CAST(N'2014-01-21T15:09:59.797' AS DateTime), 5, 6409, 239, 5)
      ,(1161, 2, N'1393/01/18', CAST(N'2014-04-08T12:07:35.310' AS DateTime), 50, 8340, 189, 50)
      ,(1161, 2, N'1393/02/08', CAST(N'2014-05-03T15:15:45.840' AS DateTime), 3, 8197, 186, 3)
      ,(1161, 2, N'1393/02/08', CAST(N'2014-05-03T15:16:00.710' AS DateTime), 27, 6409, 159, 27)
      ,(1161, 1, N'1392/06/10', CAST(N'2014-05-10T11:32:04.013' AS DateTime), 40, 6409, 199, 40)
      ,(1161, 2, N'1393/01/15', CAST(N'2014-06-10T15:02:11.363' AS DateTime), 1, 8197, 194, 1)
      ,(1161, 2, N'1393/01/15', CAST(N'2014-06-10T15:02:11.363' AS DateTime), 1, 8197, 194, 1)
      ,(1161, 2, N'1393/01/15', CAST(N'2014-06-10T15:02:11.363' AS DateTime), 3, 8197, 194, 1)
      ,(1161, 2, N'1393/03/05', CAST(N'2014-06-10T15:02:51.280' AS DateTime), 3, 8197, 181, 3)
      ,(1161, 2, N'1393/03/05', CAST(N'2014-06-10T15:02:51.280' AS DateTime), 10, 8197, 181, 3)
      ,(1161, 1, N'1392/06/10', CAST(N'2014-06-14T14:44:47.193' AS DateTime), 80, 8197, 261, 80)
      ,(1161, 1, N'1392/06/10', CAST(N'2014-06-14T14:44:47.220' AS DateTime), 50, 8197, 311, 50)
      ,(1161, 2, N'1393/04/10', CAST(N'2014-07-01T13:27:57.767' AS DateTime), 5, 8197, 306, 5)
      ,(1161, 2, N'1393/04/16', CAST(N'2014-07-07T12:11:02.837' AS DateTime), 20, 8340, 286, 20)
      ,(1161, 2, N'1393/04/23', CAST(N'2014-07-14T11:34:51.507' AS DateTime), 100, 8340, 186, 100)
      ,(1161, 2, N'1393/09/10', CAST(N'2014-12-02T14:18:48.387' AS DateTime), 30, 8340, 156, 30)
      ,(1161, 2, N'1393/10/06', CAST(N'2014-12-27T13:18:03.080' AS DateTime), 58, 8340, 96, 58)
      ,(1161, 2, N'1393/10/06', CAST(N'2014-12-27T13:18:03.080' AS DateTime), 2, 8340, 96, 58)
      ,(1161, 2, N'1393/10/06', CAST(N'2014-12-27T13:18:14.290' AS DateTime), 43, 8340, 53, 43)
      ,(1161, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 10, 8340, 13, 10)
      ,(1161, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 10, 8340, 13, 10)
      ,(1161, 2, N'1393/10/07', CAST(N'2014-12-28T08:31:25.213' AS DateTime), 20, 11475, 13, 10)
      ,(1161, 1, N'1393/10/08', CAST(N'2014-12-29T10:18:53.120' AS DateTime), 100, 11475, 113, 100)
      ,(1161, 2, N'1393/10/06', CAST(N'2014-12-30T08:54:34.970' AS DateTime), 10, 8340, 93, 10)
      ,(1161, 2, N'1393/10/06', CAST(N'2014-12-30T08:54:34.970' AS DateTime), 10, 8340, 93, 10)
      ,(1161, 2, N'1393/10/15', CAST(N'2015-01-05T14:30:20.563' AS DateTime), 10, 11475, 83, 10)
      ,(1161, 2, N'1393/10/15', CAST(N'2015-01-06T08:48:15.107' AS DateTime), 20, 11475, 63, 20)
      ,(1161, 2, N'1393/10/21', CAST(N'2015-01-14T09:54:39.940' AS DateTime), 2, 11475, 61, 2)
      ,(1161, 2, N'1393/10/30', CAST(N'2015-01-21T12:43:14.703' AS DateTime), 10, 6409, 51, 10)
      ,(1161, 1, N'1393/10/30', CAST(N'2015-01-21T16:05:00.070' AS DateTime), 1, 8197, 52, 1)
      ,(1161, 2, N'1393/12/12', CAST(N'2015-03-03T15:08:17.223' AS DateTime), 10, 11475, 42, 10)
      ,(1161, 1, N'1393/12/18', CAST(N'2015-03-09T15:28:52.163' AS DateTime), 50, 16393, 92, 50)
      ,(1161, 2, N'1393/12/23', CAST(N'2015-03-15T08:08:47.193' AS DateTime), 50, 16393, 42, 50)
      ,(1161, 2, N'1393/12/22', CAST(N'2015-03-18T10:23:36.967' AS DateTime), 20, 11475, 22, 20)
      ,(1161, 1, N'1393/12/29', CAST(N'2015-03-20T13:16:11.930' AS DateTime), 11, 11475, 33, 11)
      ,(1161, 1, N'1393/12/29', CAST(N'2015-03-20T13:55:53.813' AS DateTime), 11, 11475, 44, 11)
      ,(1161, 1, N'1393/12/29', CAST(N'2015-03-20T15:54:41.177' AS DateTime), 11, 11475, 55, 11)
      ,(1161, 2, N'1394/02/08', CAST(N'2015-05-23T09:58:31.557' AS DateTime), 10, 16393, 45, 10)
      ,(1161, 1, N'1394/03/09', CAST(N'2015-05-31T11:34:05.680' AS DateTime), 50, 16393, 95, 50)
      ,(1161, 2, N'1394/04/15', CAST(N'2015-07-06T10:34:11.627' AS DateTime), 20, 16393, 75, 20)
      ,(1161, 1, N'1394/04/24', CAST(N'2015-07-15T14:32:59.180' AS DateTime), 100, 16393, 175, 100)
      ,(1161, 2, N'1394/05/12', CAST(N'2015-09-15T11:50:03.187' AS DateTime), 4, 16393, 171, 4)
      ,(1161, 2, N'1394/06/22', CAST(N'2015-09-15T11:50:07.593' AS DateTime), 2, 16393, 169, 2)
      ,(1161, 2, N'1394/04/21', CAST(N'2015-09-19T16:21:24.337' AS DateTime), 30, 16393, 139, 30)
      ,(1161, 1, N'1394/08/14', CAST(N'2015-11-05T09:47:57.293' AS DateTime), 50, 11475, 189, 50)
      ,(1161, 2, N'1394/10/13', CAST(N'2016-01-03T09:31:15.147' AS DateTime), 3, 11475, 186, 3)
      ,(1161, 2, N'1394/09/02', CAST(N'2016-01-03T09:31:22.527' AS DateTime), 5, 11475, 181, 5)
      ,(1161, 2, N'1393/10/15', CAST(N'2016-01-13T14:07:54.407' AS DateTime), 50, 11475, 131, 50)
      ,(1161, 2, N'1394/12/11', CAST(N'2016-03-19T03:37:19.547' AS DateTime), 5, 16393, 126, 5)
      ,(1161, 2, N'1394/08/05', CAST(N'2016-03-19T10:45:10.160' AS DateTime), 50, 16393, 76, 50)
      ,(1161, 2, N'1394/12/29', CAST(N'2016-03-19T14:08:26.040' AS DateTime), 3, 11475, 73, 3)
      ,(1161, 2, N'1394/12/29', CAST(N'2016-03-19T14:24:24.763' AS DateTime), 3, 11475, 70, 3)
      ,(1161, 2, N'1395/02/12', CAST(N'2016-05-01T19:36:41.440' AS DateTime), 30, 11475, 40, 30)
      ,(1161, 2, N'1395/02/25', CAST(N'2016-05-14T14:08:58.717' AS DateTime), 10, 11475, 30, 10)
      ,(1161, 1, N'1395/02/27', CAST(N'2016-05-16T14:57:36.990' AS DateTime), 25, 16393, 55, 25)
      ,(1161, 1, N'1395/02/27', CAST(N'2016-05-16T15:27:31.540' AS DateTime), 30, 11475, 85, 30)
      ,(1161, 2, N'1395/03/23', CAST(N'2016-06-12T14:18:00.980' AS DateTime), 10, 11475, 55, 10)
      ,(1161, 2, N'1395/03/23', CAST(N'2016-06-12T14:18:00.980' AS DateTime), 20, 11475, 55, 10)
      ,(1161, 1, N'1395/03/25', CAST(N'2016-06-14T11:31:44.487' AS DateTime), 100, 16393, 165, 100)
      ,(1161, 1, N'1395/03/25', CAST(N'2016-06-14T11:31:44.487' AS DateTime), 10, 0, 165, 100)
      ,(1161, 2, N'1395/04/05', CAST(N'2016-06-26T08:51:22.697' AS DateTime), 40, 16393, 125, 40)
      ,(1161, 2, N'1395/01/25', CAST(N'2016-07-05T09:18:33.837' AS DateTime), 5, 16393, 120, 5)
      ,(1161, 2, N'1395/04/08', CAST(N'2016-07-05T09:18:37.423' AS DateTime), 5, 16393, 115, 5)
      ,(1161, 2, N'1395/03/23', CAST(N'2016-07-05T11:42:40.480' AS DateTime), 25, 16393, 90, 25)
      ,(1161, 2, N'1394/12/19', CAST(N'2016-07-05T11:43:02.413' AS DateTime), 30, 16393, 60, 30)
      ,(1161, 2, N'1395/05/27', CAST(N'2016-08-17T14:11:20.290' AS DateTime), 30, 16393, 30, 30)
      ,(1161, 2, N'1395/06/10', CAST(N'2016-08-31T11:45:54.370' AS DateTime), 6, 11475, 5, 6)
      ,(1161, 2, N'1395/06/10', CAST(N'2016-08-31T11:45:54.370' AS DateTime), 9, 11475, 5, 6)
      ,(1161, 2, N'1395/06/10', CAST(N'2016-08-31T11:45:54.370' AS DateTime), 1, 11475, 5, 6)
      ,(1161, 2, N'1395/06/10', CAST(N'2016-08-31T11:45:54.370' AS DateTime), 9, 11475, 5, 6)
      ,(1161, 2, N'1395/07/12', CAST(N'2016-10-03T14:06:31.797' AS DateTime), 10, 0, -5, 10)
      ,(1161, 1, N'1395/07/14', CAST(N'2016-10-05T10:00:38.903' AS DateTime), 150, 11475, 145, 150)
      ,(1161, 2, N'1395/08/19', CAST(N'2016-12-03T11:21:37.600' AS DateTime), 5, 16393, 140, 5)
      ,(1161, 2, N'1395/08/19', CAST(N'2016-12-03T11:21:43.863' AS DateTime), 3, 11475, 133, 3)
      ,(1161, 2, N'1395/08/19', CAST(N'2016-12-03T11:21:43.863' AS DateTime), 4, 16393, 133, 3)
      ,(1161, 2, N'1394/06/07', CAST(N'2016-12-10T11:18:56.883' AS DateTime), 10, 11475, 123, 10)
      ,(1161, 2, N'1395/07/12', CAST(N'2016-12-10T11:19:03.053' AS DateTime), 30, 16393, 93, 30)
      ,(1161, 2, N'1395/09/30', CAST(N'2016-12-20T15:13:44.823' AS DateTime), 10, 11475, 83, 10)
      ,(1161, 1, N'1395/10/13', CAST(N'2017-01-02T09:50:32.143' AS DateTime), 200, 11475, 283, 200)
      ,(1161, 2, N'1395/12/15', CAST(N'2017-03-05T07:21:02.010' AS DateTime), 20, 11475, 263, 20)
      ,(1161, 2, N'1395/09/30', CAST(N'2017-03-11T16:20:31.147' AS DateTime), 90, 11475, 173, 90)
      ,(1161, 2, N'1394/06/07', CAST(N'2017-03-12T14:54:46.733' AS DateTime), 20, 16393, 153, 20)
      ,(1161, 1, N'1395/12/29', CAST(N'2017-03-19T12:29:01.183' AS DateTime), 14, 11475, 167, 14)
      ,(1161, 2, N'1396/02/12', CAST(N'2017-05-02T09:49:28.763' AS DateTime), 2, 11475, 162, 2)
      ,(1161, 2, N'1396/02/12', CAST(N'2017-05-02T09:49:28.763' AS DateTime), 3, 11475, 162, 2)
      ,(1161, 2, N'1396/02/12', CAST(N'2017-05-02T16:59:31.077' AS DateTime), 40, 11475, 122, 40)
      ,(1161, 2, N'1396/05/09', CAST(N'2017-07-31T15:23:09.157' AS DateTime), 20, 11475, 22, 20)
      ,(1161, 2, N'1396/05/09', CAST(N'2017-07-31T15:23:09.157' AS DateTime), 80, 11475, 22, 20)
      ,(1161, 2, N'1396/05/22', CAST(N'2017-08-13T16:02:02.420' AS DateTime), 50, 11475, -28, 50)
      ,(1161, 2, N'1396/07/01', CAST(N'2017-09-23T14:50:58.650' AS DateTime), 30, 11475, -58, 30)
      ,(1161, 2, N'1396/04/12', CAST(N'2017-09-23T14:51:51.850' AS DateTime), 5, 11475, -63, 5)
      ,(1161, 2, N'1396/07/02', CAST(N'2017-10-02T09:36:01.140' AS DateTime), 9, 16393, -72, 9)
      ,(1161, 1, N'1396/07/15', CAST(N'2017-10-07T07:58:22.940' AS DateTime), 240, 11475, 168, 240)
      ,(1161, 2, N'1396/09/29', CAST(N'2017-12-20T09:02:44.207' AS DateTime), 20, 11475, 148, 20)
      ,(1161, 2, N'1396/12/28', CAST(N'2018-03-19T11:38:06.520' AS DateTime), 10, 11475, 138, 10)
      ,(1161, 2, N'1397/05/14', CAST(N'2018-08-05T11:55:13.680' AS DateTime), 20, 11475, 108, 20)
      ,(1161, 2, N'1397/05/14', CAST(N'2018-08-05T11:55:13.680' AS DateTime), 10, 11475, 108, 20)
      ,(1161, 2, N'1397/05/08', CAST(N'2018-08-11T07:27:28.817' AS DateTime), 25, 11475, 83, 25)
      ,(1161, 2, N'1397/03/12', CAST(N'2018-08-19T09:56:40.777' AS DateTime), 20, 11475, 63, 20)
      ,(1161, 2, N'1397/06/07', CAST(N'2018-08-29T11:04:48.817' AS DateTime), 30, 11475, 33, 30)
      ,(1161, 2, N'1397/06/10', CAST(N'2018-09-01T14:48:46.960' AS DateTime), 50, 11475, -17, 50)
    go

  • Hamid-Sadeghian - Wednesday, October 31, 2018 12:08 AM

    ChrisM@Work - Tuesday, October 30, 2018 10:49 AM

    Hamid-Sadeghian - Tuesday, October 30, 2018 4:09 AM

    ChrisM@Work - Tuesday, October 30, 2018 3:55 AM

    Hamid-Sadeghian - Tuesday, October 30, 2018 12:15 AM

    Hi ,
    I have a table that I want to calculate FIFO and update each price of items in table.
    in table picture , I have a drug_Code, type,dateTime_post,Total_sum,Cost_Perone.
    Type 1 is input products and  type 2,3 is output products.
    for example :
    40 products bought at 2013-09-30 with price 2205
    now I want to update rows of 4,5,6 that is type 2 and sold at different dates but total sum of Total_sum field is 40 that  equal to 40 that bought at first row. then  for other rows that type is 2,3 I want to update cost_perone to 2205 that for 2nd rows that is 100 till to sold items equal to 100.

    How can I write this query without cursor .?thanks for advanced.

    Sure - can you set up your sample data as a CREATE TABLE and INSERTs to populate it with data, to exactly match the picture you've posted? For anyone wishing to help you, posting sample data (as a runnable script) with your question saves them a ton of time.

    Thank you for your hint.
    Sample data and table script was attached

    Thanks for that - I'm very sorry but I cannot make head or tail of your description of the problem domain. Can you put in some additional detail please? Also, it often helps to show before and after using some of the data as an example. Thanks.

    Thank you for reply
    please see the excel file that was attached.
     in this excel file cost_expected is the column that I need to calculate. in the description column I explain more.

    I did look at the spreadsheet and sorry but it made no sense to me.  It could be I just haven't had enough wake up juice yet.

  • Thank you for helping me to send my question in correct format.
    I send spreadsheet only for say what I want.

    In this picture, Cost_Expected field gets returned for me. This table is the goods-to-the-repository input/output list. The 'type' field here contains numbers One and Two. Number One is for the input goods and number Two is for the ouput goods. In the second row, the value of Cost_Expected field equals Cost_PerOne field. Wherever our 'type' field equals One, the value of Cost_Expected field must be equal to the value of Cost_PerOne.
    But for the output records, the following structure must be applied.
    This is FIFO calculation approach.
    In FIFO, the price tag of the first object that enters the repository must be set on the ouput goods so that object completely reaches Zero. Then, if we had another sale, the second object entering the repository will be used. In this example, the 5th row contains our first sale that its value is 20 units. The price of the first entrance of the 40 units is 2205. Therefore, for that object the 2205 price tag will be set. In the 6th and 7th rows, because the sum of the two values equals 20 and the remainder unit from the first object to the repository is still 20, so the numerical value of those become 2205 too which you can observe in the image.
    Now row 8 has 40 units of sale. The first 40 that entered the repository has been finished. So we must use the second object that was been 100 of quantity in that type and entered the repository with price of 2205. Now here, 40 units subtract from that 100 units with price of 2205 and 60 units left. In row 10 there were 20 units of sale that must be reduced from the second object that was 100 in quantity which now 40 units remain and the price is 2205. The rows 11 and 12 had 10 units sold combined and because there are 40 units from the second object again, it will be reduced from that and the price is 2205. But for row 15, there are 30 units of the second object which get subtracted, again, with price 2205. Five goods of the third row get extracted with the price 2045. Again, of five will be reduced from row 9 with the price 2049. Then, 60 units of row 13 will be reduced and at the end 130 units from row 14 with price 220, too. Finally, the price calculation formula is as the following.
    (30*2203+(5*2049)+(5*2049)+(60*2049)+(130*2205))/220=2213

    This approach must be applied to all the goods.

  • Hamid-Sadeghian - Wednesday, October 31, 2018 10:42 AM

    Thank you for helping me to send my question in correct format.
    I send spreadsheet only for say what I want.
     

      fasd
      afsd

    What I am saying is that what you put in the spreadsheet makes no sense.  Based on the sample data what do you want in return?

  • Thank you for helping me to send my question in correct format.
    I send spreadsheet only for say what I want.

    In this picture, Cost_Expected field gets returned for me. This table is the goods-to-the-repository input/output list. The 'type' field here contains numbers One and Two. Number One is for the input goods and number Two is for the ouput goods. In the second row, the value of Cost_Expected field equals Cost_PerOne field. Wherever our 'type' field equals One, the value of Cost_Expected field must be equal to the value of Cost_PerOne.
    But for the output records, the following structure must be applied.
    This is FIFO calculation approach.
    In FIFO, the price tag of the first object that enters the repository must be set on the ouput goods so that object completely reaches Zero. Then, if we had another sale, the second object entering the repository will be used. In this example, the 5th row contains our first sale that its value is 20 units. The price of the first entrance of the 40 units is 2205. Therefore, for that object the 2205 price tag will be set. In the 6th and 7th rows, because the sum of the two values equals 20 and the remainder unit from the first object to the repository is still 20, so the numerical value of those become 2205 too which you can observe in the image.
    Now row 8 has 40 units of sale. The first 40 that entered the repository has been finished. So we must use the second object that was been 100 of quantity in that type and entered the repository with price of 2205. Now here, 40 units subtract from that 100 units with price of 2205 and 60 units left. In row 10 there were 20 units of sale that must be reduced from the second object that was 100 in quantity which now 40 units remain and the price is 2205. The rows 11 and 12 had 10 units sold combined and because there are 40 units from the second object again, it will be reduced from that and the price is 2205. But for row 15, there are 30 units of the second object which get subtracted, again, with price 2205. Five goods of the third row get extracted with the price 2045. Again, of five will be reduced from row 9 with the price 2049. Then, 60 units of row 13 will be reduced and at the end 130 units from row 14 with price 220, too. Finally, the price calculation formula is as the following.
    (30*2203+(5*2049)+(5*2049)+(60*2049)+(130*2205))/220=2213

    This approach must be applied to all the goods.

  • Hamid-Sadeghian - Wednesday, October 31, 2018 10:55 PM

    Thank you for helping me to send my question in correct format.
    I send spreadsheet only for say what I want.

    In this picture, Cost_Expected field gets returned for me. This table is the goods-to-the-repository input/output list. The 'type' field here contains numbers One and Two. Number One is for the input goods and number Two is for the ouput goods. In the second row, the value of Cost_Expected field equals Cost_PerOne field. Wherever our 'type' field equals One, the value of Cost_Expected field must be equal to the value of Cost_PerOne.
    But for the output records, the following structure must be applied.
    This is FIFO calculation approach.
    In FIFO, the price tag of the first object that enters the repository must be set on the ouput goods so that object completely reaches Zero. Then, if we had another sale, the second object entering the repository will be used. In this example, the 5th row contains our first sale that its value is 20 units. The price of the first entrance of the 40 units is 2205. Therefore, for that object the 2205 price tag will be set. In the 6th and 7th rows, because the sum of the two values equals 20 and the remainder unit from the first object to the repository is still 20, so the numerical value of those become 2205 too which you can observe in the image.
    Now row 8 has 40 units of sale. The first 40 that entered the repository has been finished. So we must use the second object that was been 100 of quantity in that type and entered the repository with price of 2205. Now here, 40 units subtract from that 100 units with price of 2205 and 60 units left. In row 10 there were 20 units of sale that must be reduced from the second object that was 100 in quantity which now 40 units remain and the price is 2205. The rows 11 and 12 had 10 units sold combined and because there are 40 units from the second object again, it will be reduced from that and the price is 2205. But for row 15, there are 30 units of the second object which get subtracted, again, with price 2205. Five goods of the third row get extracted with the price 2045. Again, of five will be reduced from row 9 with the price 2049. Then, 60 units of row 13 will be reduced and at the end 130 units from row 14 with price 220, too. Finally, the price calculation formula is as the following.
    (30*2203+(5*2049)+(5*2049)+(60*2049)+(130*2205))/220=2213

    This approach must be applied to all the goods.

    You just repeated your post.   If it wasn't understood the first time, it's not suddenly going to work the 2nd time.  In fact, that could be interpreted as disrespectful by some folks.   I understand the concept of FIFO, and I suspect Lynn does as well, but your explanation only explains how FIFO works, and does nothing to tie the data in your spreadsheet to any of the inherent concepts.   We have no idea what a given row in your data represents, nor how it came to exist in that form.  We don't know if you need a query that from this data will simply do the FIFO work and produce a new value for CostExpected, or if you need an UPDATE query to correct the value.   Remember, we can't know what you don't tell us.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Thank you . duplicate post only for error in my internet connection. sorry about that. I can't find how to delete the duplicate post.
    but about your question. This data come from a data entry form for input and output goods. field cost_expected is the field that I need to calculate.
    This data sort on Datetime and drug_code that is code of goods.
    Also the script of table and sample data is posted on post no 1. and edited by Lynn (thanks)
    I only need a select that create the cost_expected field in my result. 
    But I don't understand what you need to know to helping me to solve this problem 🙁🙁

  • Hamid-Sadeghian - Thursday, November 1, 2018 6:58 AM

    Thank you . duplicate post only for error in my internet connection. sorry about that. I can't find how to delete the duplicate post.
    but about your question. This data come from a data entry form for input and output goods. field cost_expected is the field that I need to calculate.
    This data sort on Datetime and drug_code that is code of goods.
    Also the script of table and sample data is posted on post no 1. and edited by Lynn (thanks)
    I only need a select that create the cost_expected field in my result. 
    But I don't understand what you need to know to helping me to solve this problem 🙁🙁

    And again, post the expected results of the query.  I am a visual problem solver.  I need the starting state of the data and final state of the data, then I can figure out the magic that occurs between the two.  The easiest way for you to do that is create a new table, call it results.  Populate it with data based on the sample data you provided that shows what you expect to be returned from the query.

  • If it reasonably takes an employee months to learn how a business unit works, it is not reasonable to expect a forum helper to pickup all details in one shot. So is always a good start to post what you have (starting data) and what you want to end up with ( ending data). Let the forum helpers guide you instead of explaining the situation only in the way you see it without the proper background. Dont assume that what is in your mind is in others as well automatically.

    ----------------------------------------------------

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply