Report Generator Demo
This is where you can play around with the hierarchical report generator by supplying a where clause in plain text and (de)selecting columns of the various lists (4 tables and a subselect) involved.
For a tutorial on how to construct expressions and what the extra options in this demo are click here.
For an overview of the content in all the base tables used in this hierarchical report click here.
The small window you are using greatly diminishes your demo experience. Please consider viewing using a larger window.
Command Text:
SELECT
[Customer].[Id] [Customer_Id],
[Customer].[FirstName] [Customer_FirstName],
[Customer].[LastName] [Customer_LastName],
[Customer].[DateOfBirth] [Customer_DateOfBirth],
[Customer].[IsPreferred] [Customer_IsPreferred],
[Customer].[HomeAddressId] [Customer_HomeAddressId],
[Customer].[BillingAddressId] [Customer_BillingAddressId],
[CustomerHomeAddress].[Id] [CustomerHomeAddress_Id],
[CustomerHomeAddress].[City] [CustomerHomeAddress_City],
[CustomerHomeAddress].[ZipCode] [CustomerHomeAddress_ZipCode],
[CustomerHomeAddress].[Street] [CustomerHomeAddress_Street],
[CustomerHomeAddress].[HouseNumber] [CustomerHomeAddress_HouseNumber],
[CustomerHomeAddress].[HouseNumberAddition] [CustomerHomeAddress_HouseNumberAddition],
[CustomerBillingAddress].[Id] [CustomerBillingAddress_Id],
[CustomerBillingAddress].[City] [CustomerBillingAddress_City],
[CustomerBillingAddress].[ZipCode] [CustomerBillingAddress_ZipCode],
[CustomerBillingAddress].[Street] [CustomerBillingAddress_Street],
[CustomerBillingAddress].[HouseNumber] [CustomerBillingAddress_HouseNumber],
[CustomerBillingAddress].[HouseNumberAddition] [CustomerBillingAddress_HouseNumberAddition],
[Purchase].[Id] [Purchase_Id],
[Purchase].[CustomerId] [Purchase_CustomerId],
[Purchase].[ProductId] [Purchase_ProductId],
[Purchase].[Quantity] [Purchase_Quantity],
[Purchase].[Date] [Purchase_Date],
[Purchase].[DeliveryAddressId] [Purchase_DeliveryAddressId],
[PurchasedProduct]._38c08b037b7d44059a44e1fbfa7dfece [PurchasedProduct_Id],
[PurchasedProduct]._31332de2ea1641deacd6deea9927fc83 [PurchasedProduct_Name],
[PurchasedProduct]._2e9bb6fadec64882a0edb2c538eda9ce _a146861832e2b79fca95c4efed222b48,
[PurchasedProduct]._dc87f1632e8240069d9a5a731db364b2 _7eeb05367149c3cec691a86b9c63f640,
[PurchasedProduct]._66acb64444f04e06b5aa67262dec4ea2 [PurchasedProduct_Price],
[PurchaseDeliveryAddress].[Id] [PurchaseDeliveryAddress_Id],
[PurchaseDeliveryAddress].[City] [PurchaseDeliveryAddress_City],
[PurchaseDeliveryAddress].[ZipCode] [PurchaseDeliveryAddress_ZipCode],
[PurchaseDeliveryAddress].[Street] [PurchaseDeliveryAddress_Street],
[PurchaseDeliveryAddress].[HouseNumber] [PurchaseDeliveryAddress_HouseNumber],
[PurchaseDeliveryAddress].[HouseNumberAddition] [PurchaseDeliveryAddress_HouseNumberAddition]
FROM [Customer] [Customer]
LEFT JOIN [Address] [CustomerHomeAddress] ON ([Customer].[HomeAddressId] = [CustomerHomeAddress].[Id])
LEFT JOIN [Address] [CustomerBillingAddress] ON ([Customer].[BillingAddressId] = [CustomerBillingAddress].[Id])
LEFT JOIN [Purchase] [Purchase] ON ([Customer].[Id] = [Purchase].[CustomerId])
LEFT JOIN
(
SELECT
_7135318f90ba4fa3b885b44d004a3d48.[Id] _38c08b037b7d44059a44e1fbfa7dfece,
_7135318f90ba4fa3b885b44d004a3d48.[Name] _31332de2ea1641deacd6deea9927fc83,
_7a195ce605bd458181f41463a17213dc.[From] _2e9bb6fadec64882a0edb2c538eda9ce,
ISNULL(_7a195ce605bd458181f41463a17213dc.[UpTo], '3000-01-01 00:00:00.000') _dc87f1632e8240069d9a5a731db364b2,
_7a195ce605bd458181f41463a17213dc.[Price] _66acb64444f04e06b5aa67262dec4ea2
FROM [Product] _7135318f90ba4fa3b885b44d004a3d48
INNER JOIN [ProductPriceHistory] _7a195ce605bd458181f41463a17213dc ON (_7135318f90ba4fa3b885b44d004a3d48.[Id] = _7a195ce605bd458181f41463a17213dc.[ProductId])
) [PurchasedProduct] ON
(
([Purchase].[ProductId] = [PurchasedProduct]._38c08b037b7d44059a44e1fbfa7dfece)
AND
([PurchasedProduct]._2e9bb6fadec64882a0edb2c538eda9ce <= [Purchase].[Date])
AND
([PurchasedProduct]._dc87f1632e8240069d9a5a731db364b2 > [Purchase].[Date])
)
LEFT JOIN [Address] [PurchaseDeliveryAddress] ON ([Purchase].[DeliveryAddressId] = [PurchaseDeliveryAddress].[Id])