Skip to content

MySql Group by but still show all rows

I have the following database ID imagename testresult sampleref uploadedat orderid 1 filename1.png NULL ABC123 2021-08-19 12:00 1002 2 filename2.png NULL ABC123 2021-08-19 13:00 1001 3 filename3….

SQL_Case and When

I have a data set where I need to calculate minimum amount due. I have used the below code SELECT *, Sales – Reversal AS Net_Sale, charge1 – charge1_rev AS Net_Fee1, CASE WHEN Net_Sale < 500 THEN …

Split the given column in oracle sql

I want to split the following table column {“senderName”:”John David”, “senderCountry”:”LKA”, “senderAddress”:”No 230,ABS,11200} I want to get …

Extracting date in SQL

I have a column due date in the format 20210701 (YYYYMMDD), using SQL I want to extract all the dates apart from 5th of particular month ( As highlighted in the pic below ) I used the below code: …

Count the sum of a left outer join table

I have two tables which is Student ID Name Gender Address 1 Abby Girl street 2 Mark Boy street 3 Lula Girl street 4 Bren boy street Lessons ID Lessons_code 3 MK2234 5 22324KL 6 KCS233 and I …