OK, found an old database with VAT setup.
Will have same issue as multiple payments as multiple Transaction Documents per Ticket
SELECT t.[Id] AS [Ticket ID],
t.[Date] AS [Ticket Date],
t.[TotalAmount] AS [Ticket Total],
p.[Id] AS [Payment ID],
p.[Date] AS [Payment Date],
p.[Name] AS [Payment Type],
p.[Amount] AS [Payment Amount],
a.[Amount] AS [Transaction Amount],
a.[Name] AS [Transaction Desc]
FROM [Tickets] t JOIN [Payments] p ON t.[Id] = p.[TicketId] JOIN [AccountTransactions] a ON t.[TransactionDocument_Id] = a.[AccountTransactionDocumentId]
WHERE t.[Date] >= '2015-01-01' AND t.[Date] <= '2015-12-31'
You might be best to provide 3 separate tables;
Ticket Details
SELECT t.[Id] AS [Ticket ID],
t.[Date] AS [Ticket Date],
t.[TotalAmount] AS [Ticket Total]
FROM [Tickets] t
WHERE t.[Date] >= '2015-01-01' AND t.[Date] <= '2015-12-31'
Payment Details
SELECT t.[Id] AS [Ticket ID],
p.[Id] AS [Payment ID],
p.[Date] AS [Payment Date],
p.[Name] AS [Payment Type],
p.[Amount] AS [Payment Amount]
FROM [Tickets] t JOIN [Payments] p ON t.[Id] = p.[TicketId]
WHERE t.[Date] >= '2015-01-01' AND t.[Date] <= '2015-12-31'
Account Transactions
SELECT t.[Id] AS [Ticket ID],
a.[Amount] AS [Transaction Amount],
a.[Name] AS [Transaction Desc]
FROM [Tickets] t JOIN [AccountTransactions] a ON t.[TransactionDocument_Id] = a.[AccountTransactionDocumentId]
WHERE t.[Date] >= '2015-01-01' AND t.[Date] <= '2015-12-31
QMcKay might have some better ideas but the duplicate rows I believe is unavoidable given the structure of what your asking.
EDIT:
If you drop the payment breakdown you could show;
Ticket ID, Ticket Date, Tax and Total
SELECT t.[Id] AS [Ticket ID],
t.[Date] AS [Ticket Date],
a.[Amount] AS [Tax],
t.[TotalAmount] AS [Ticket Total]
FROM [Tickets] t JOIN [AccountTransactions] a ON t.[TransactionDocument_Id] = a.[AccountTransactionDocumentId]
WHERE t.[Date] >= '2015-01-01' AND t.[Date] <= '2015-12-31' AND a.[Name] = 'VAT Transaction'
You would need to change ‘VAT Transaction’ to your Transaction name for your tax…