Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports View(s) #495

Open
jSylvestre opened this issue Oct 24, 2024 · 1 comment
Open

Reports View(s) #495

jSylvestre opened this issue Oct 24, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jSylvestre
Copy link
Member

Create view(s) in the database to facilitate running reports with filters.
Will need to look at payment's dates as one of the filters, and maybe sum up the amount of payments during that time range as well as reporting on the actual order fields.

Once view is created and tested, that will need to be pulled into the migration

@jSylvestre jSylvestre added the enhancement New feature or request label Oct 24, 2024
@jSylvestre jSylvestre self-assigned this Oct 24, 2024
@jSylvestre
Copy link
Member Author

SELECT dbo.Payments.CreatedOn, dbo.Payments.Status, dbo.Orders.Id, dbo.Orders.Name, dbo.Payments.Amount
FROM dbo.Payments INNER JOIN
dbo.Orders ON dbo.Payments.OrderId = dbo.Orders.Id

SELECT TOP (1000) [Id]
,sum([Amount]) as total
,max([createdOn]) as toDate
,max([createdOn]) as fromDate
FROM [Hippo].[dbo].[Test View]
where Status = 'Completed'
and CreatedOn < '2024-08-01' and CreatedOn >= '2024-07-01'
group by Id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant