We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
HELLO
i have sql code
SELECT
SUM(count) as 'count1',
SUM(sum) as 'sum1',
CASE WHEN ( SUM(count) = 0 )
THEN 0
ELSE ( SUM(sum) / SUM(count) )
END as 'avg',
year
FROM
(
SELECT
DISTINCT ( EXTRACT(YEAR FROM t.ipodate) ) as 'year',
COUNT(t.ipodate) as 'count',
COALESCE ( SUM( ( COALESCE(t.ipoproceeds,0)+COALESCE(t.overallotmentproceeds,0) ) ), 0) as 'sum',
( SUM( ( COALESCE(t.ipoproceeds,0)+COALESCE(t.overallotmentproceeds,0) ) ) / COUNT(t.ipodate) ) as 'average'
FROM `wp_wpdatatable_1` t
WHERE t.archived = 'No' AND EXTRACT(YEAR FROM t.ipodate) > 0
GROUP BY EXTRACT(YEAR FROM t.ipodate)
UNION ALL
SELECT
DISTINCT ( EXTRACT(YEAR FROM t.ipodate) ) as 'year',
COUNT(t.ipodate) as 'count',
SUM( COALESCE( t.archivedsize, 0 ) ) as 'sum',
SUM( COALESCE( t.archivedsize, 0 ) ) / COUNT(t.ipodate) as 'average'
FROM `wp_wpdatatable_1` t
WHERE t.archived= 'Yes' AND EXTRACT(YEAR FROM t.ipodate) > 0
GROUP BY EXTRACT(YEAR FROM t.ipodate)
ORDER BY `year` DESC
)
main
GROUP BY YEAR
it 's executed directly in sql without problem https://prnt.sc/v8jl0n
but in wpdatatbles i got error https://prnt.sc/v8jled
how can i use this sql in my wpdatatables plugin and where is problem here?
Hello Roman
Thank you for your purchase.
If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (rarely happens, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.
Please note some this when working with the server-side processing feature:
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables