You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StringsqlStatement = "select t1.firstitem, t1.seconditem, t1.concat as menuitemstogether, COUNT(t1.concat) from (SELECT a.menuitemid as firstitem, b.menuitemid as seconditem, a.orderid, CONCAT(a.menuitemid, ' ', b.menuitemid) FROM orderlineitems a JOIN orderlineitems b ON a.orderid = b.orderid and a.menuitemid < b.menuitemid) t1 INNER JOIN (select orders.ordertime, orders.orderid from orders where orders.ordertime between '"
592
+
+ startTime + "' AND '" + endTime
593
+
+ "' group by orders.orderid) t2 ON t1.orderid = t2.orderid GROUP BY t1.firstitem, t1.seconditem, t1.concat ORDER BY COUNT(t1.concat) DESC;";
594
+
System.out.println(sqlStatement);
595
+
r = stmt.executeQuery(sqlStatement);
596
+
} catch (Exceptione) {
597
+
System.out.println(e.getMessage());
598
+
}
599
+
returnr;
600
+
}
601
+
577
602
/**
578
603
* Retrieves a result set containing the X report for the most recent day.
0 commit comments