Database error: A Database Error Occurred

Error Number: 42000/8120

[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column 'travels.dbo.GroupInventory.InventoryOrder' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

SELECT "GroupInventory".*, "Suppliers"."Name", "Suppliers"."FreqTvlrProgramName", COUNT(Reservations.BookingId) as num_rooms FROM "travels"."dbo"."GroupInventory" LEFT JOIN "travels"."dbo"."Suppliers" ON "Suppliers"."SupplierId" = "GroupInventory"."SupplierId" LEFT JOIN "travels"."dbo"."Reservations" ON "Reservations"."InventoryId" ="GroupInventory"."RecId" and "Reservations"."ReservationStatus"='ACTIVE' WHERE "GroupInventory"."GroupId" = '10329' GROUP BY "Reservations"."InventoryId", "GroupInventory"."RecId", "GroupInventory"."GroupId", "GroupInventory"."AddOn", "GroupInventory"."Description", "Suppliers"."Name", "Suppliers"."FreqTvlrProgramName", "GroupInventory"."RateType", "GroupInventory"."CmsType", "GroupInventory"."CmsAmt", "GroupInventory"."AgentSplit", "GroupInventory"."AgentAmt", "GroupInventory"."Deposit", "GroupInventory"."CreateAgent", "GroupInventory"."CreateDate", "GroupInventory"."ModifyAgent", "GroupInventory"."ModifyDate", "GroupInventory"."SupplierId", "GroupInventory"."SingleRate", "GroupInventory"."TripleRate", "GroupInventory"."QuadRate", "GroupInventory"."RateAmt", "GroupInventory"."QuantityHeld", "GroupInventory"."InsurancePerPerson", "GroupInventory"."GratuitiesPerPerson", "GroupInventory"."ItinComts", "GroupInventory"."InventoryImage" ORDER BY "GroupInventory"."CreateDate" DESC

Filename: models/Companywild_model2.php

Line Number: 447