Skip to content

Tag: sql

Multiple SUM in one query with multiple where

I’m trying to write a SQL query that produces a table with summarized values for each year and month. I have a table that looks something like this: And another table that looks like this: I want to have a query that returns the sum for each month like this: Explanation of the output: Year and Month are…

Seperate integer into character PHP

i try to make scoresheet where $row[“first”]=756987 show Math 7, Biology 5, Sport 6, Sociology 9, Chemist 8, English 7 but it keep showing all 7 can someone help solve this and show some example appreciate your help Answer Use str_split() and list() method for your use case, example below: Docs li…