MySQL view with row values concatenated, ordered and grouped in a column

Advertisements I have a table of item reviews that looks like this: **ReviewID** **ReviewerID** **ReviewText** **Category** **ItemID** **date_time** 01 1212 good product Mobile 1 23/Apr/2022 02 1233 will buy again fruit 2 24/Apr/2022 03 1245 not recommended Mobile 1 25/Apr/2022 04 1236 not ripe fruit 2 22/Apr/2022 I want to create a view that selects… Read More MySQL view with row values concatenated, ordered and grouped in a column

MySQL returning two different results from query vs stored procedure

Advertisements I’m baffled as to why MySQL Workbench returns 7 (the correct answer) for this query SELECT ScheduleLocationEventColorID FROM schedulelocationeventcolor WHERE ScheduleID = 1 AND LocationID = 1; but returns 1 (incorrect) for the equivalent in a stored procedure. CREATE PROCEDURE `test`( IN locationID INT, IN scheduleID INT ) BEGIN DECLARE slecID INT; SELECT ScheduleLocationEventColorID… Read More MySQL returning two different results from query vs stored procedure

want to get each Groups latest row, group by multiple column

Advertisements I need to get the latest row of each combinations of sender_id & receiver_id my messaging table: CREATE TABLE messaging ( msg_id SERIAL, sender_id BIGINT NOT NULL , receiver_id varchar(255) NOT NULL , msg text default NULL, media_link TEXT DEFAULT NULL, sent_time TIMESTAMP NOT NULL DEFAULT NOW(), received_time TIMESTAMP default NULL, msg_type ENUM(‘text’,’link’,’file’) default… Read More want to get each Groups latest row, group by multiple column