wp_aieo_cumulative_order_stats

Static

Stores order records and related transaction data.

CREATE TABLE Statement

create table IF NOT EXISTS wp_aieo_cumulative_order_stats (INDEX order_id_idx (OrderID, CustomerEmail)) SELECT ws1.orderid as OrderID, ws1.customeremail as CustomerEmail, ws1.statsclientid as StatsClientID, ws1.postcode as Postcode, ws1.orderspend as OrderSpend, ws1.numberofitemsperorder as NumberOfItemsPerOrder, Round(AVG(ws2.orderspend),2) as TotalAverageOrder, Round(AVG(ws1.orderspend)/(ws1.numberofitemsperorder),2) as AveSpendOfUserPerItemPerOrder, ws1.numberoforders as TotalNumberofOrders, Round(AVG(ws2.numberofitemsperorder),2) as AveItemsOfUserPerOrder, Round(STD(ws2.numberofitemsperorder),2) as STDItemsOfUser, Round( STD(ws2.numberofitemsperorder) /MIN(ws2.numberofitemsperorder) ,2) as STDPerMinItemsOfUser, Round( STD(ws2.numberofitemsperorder) /AVG(ws2.numberofitemsperorder) ,2) as STDPerAverageItemsOfUser, Round( STD(ws2.numberofitemsperorder) /MAX(ws2.numberofitemsperorder) ,2) as STDPerMaxItemsOfUser, Round(AVG(ws2.orderspend),2) as AveSpendOfUserPerOrder, Round(STD(ws2.orderspend),2) as STDSpendOfUser, Round( STD(ws2.orderspend) /MIN(ws2.orderspend) ,2) as STDPerMinSpendOfUser, Round( STD(ws2.orderspend) /AVG(ws2.orderspend) ,2) as STDPerAverageSpendOfUser, Round( STD(ws2.orderspend) /MAX(ws2.orderspend) ,2) as STDPerMaxSpendOfUser, ws1.buyerspayrol as BuyersPayrol, ws1.buyersday as BuyersDay, ws1.buyerstime as BuyersTime, ws1.link_to_order_details as link_to_order_details FROM wp_aieo_order_stats ws1 JOIN wp_aieo_order_stats ws2 on ws1.customeremail = ws2.customeremail Group by ws1.customeremail, ws1.orderid, ws1.numberofitemsperorder, ws1.numberoforders, ws1.orderspend,ws1.buyerspayrol, ws1.buyersday, ws1.buyerstime, ws1.link_to_order_details Order by ws1.customeremail; ALTER TABLE wp_aieo_cumulative_order_stats ADD COLUMN `id` BIGINT(45) UNSIGNED NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`);

Safe to delete?

If you have uninstalled AI eShop Optimizer, this table is generally safe to remove. However, always back up your database first.

Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.

How to remove this table

DROP TABLE IF EXISTS `wp_aieo_cumulative_order_stats`;

Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.

Other tables from AI eShop Optimizer