SQL DATE return not giving what i INSERTED in the Table

So I have created a table in SQL I get the same result on 2 different online SQL website IDE I was given to use. https://sqliteonline.com/ and https://www.jdoodle.com/execute-sql-online/ As you can see on the select query I enter the dates that I get returned are not the ones I inserted. Am I doing something wrong?… Read More SQL DATE return not giving what i INSERTED in the Table

How to merge columns from two table structures into one table, and count group by one filed?

I have two tables, City and Vehicle. Now I want to merge the two tables into one table. Then count each type of vehicle based on city. Then merge them in to one table. Could someone help me? City: City_Id City_Name 1 New York 2 Washington Vehicle: Vehicle_Id Vehicle_Type City_Id 1 Electric 2 2 Fuel… Read More How to merge columns from two table structures into one table, and count group by one filed?

Trouble retrieving emoji messages in SQL query and ignored or treated as empty string

I have the "👍" emoji stored as a message in my database. When I execute my store procedure to retrieve records where select top 10 * from t_MemberApp_PushNotifications where contactID = 10930547 and pushMessage <> ” order by 1 desc It doesn’t display the data when only emoji is present. As you can see the… Read More Trouble retrieving emoji messages in SQL query and ignored or treated as empty string

SQL find multiple longest column results with its id and collect them in a single query result

I need to find the records with the longest field answer, for example: To get the longest First_Name, Family_Name and Company, it returns 3 different records, 1 for every longest answer and its record id. SELECT TOP 1 Id, LEN(First_Name) FROM Persons Group BY Id, LEN(First_Name) ORDER BY 2 DESC Something like this would bring… Read More SQL find multiple longest column results with its id and collect them in a single query result

SQL How can I group rows for every id and date without duplicates in names and arrange them

I have got a problem and I have no idea how to solve it because I’m a beginner. I have a table like this: id date time title 1 2023-03-03 2023-03-03 10:00 A 1 2023-03-03 2023-03-03 10:10 A 1 2023-03-03 2023-03-03 10:20 A 1 2023-03-03 2023-03-03 10:30 B 1 2023-03-03 2023-03-03 10:40 B 1 2023-03-03… Read More SQL How can I group rows for every id and date without duplicates in names and arrange them