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]._949536bd6cb34ce8a331520d2426f4ca [PurchasedProduct_Id],
[PurchasedProduct]._31040955040d4c2682529cf90e7b50bf [PurchasedProduct_Name],
[PurchasedProduct]._eec87fdf8a2f4b14a02b04fbd4749554 _1faaff9a8c24fd30d6fff0b181cefc12,
[PurchasedProduct]._e13c65f850ce424aa7623dd5ec64282e _d43457fc709e7828dcaa71cb0529e45b,
[PurchasedProduct]._fabba8480e7d4b7ea141311ca323c0e8 [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
_ed551641cf854f268c58bc1b131c72f7.[Id] _949536bd6cb34ce8a331520d2426f4ca,
_ed551641cf854f268c58bc1b131c72f7.[Name] _31040955040d4c2682529cf90e7b50bf,
_5cea684d5685490fb4f7106acec9fd48.[From] _eec87fdf8a2f4b14a02b04fbd4749554,
ISNULL(_5cea684d5685490fb4f7106acec9fd48.[UpTo], '3000-01-01 00:00:00.000') _e13c65f850ce424aa7623dd5ec64282e,
_5cea684d5685490fb4f7106acec9fd48.[Price] _fabba8480e7d4b7ea141311ca323c0e8
FROM [Product] _ed551641cf854f268c58bc1b131c72f7
INNER JOIN [ProductPriceHistory] _5cea684d5685490fb4f7106acec9fd48 ON (_ed551641cf854f268c58bc1b131c72f7.[Id] = _5cea684d5685490fb4f7106acec9fd48.[ProductId])
) [PurchasedProduct] ON
(
([Purchase].[ProductId] = [PurchasedProduct]._949536bd6cb34ce8a331520d2426f4ca)
AND
([PurchasedProduct]._eec87fdf8a2f4b14a02b04fbd4749554 <= [Purchase].[Date])
AND
([PurchasedProduct]._e13c65f850ce424aa7623dd5ec64282e > [Purchase].[Date])
)
LEFT JOIN [Address] [PurchaseDeliveryAddress] ON ([Purchase].[DeliveryAddressId] = [PurchaseDeliveryAddress].[Id])