SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table ListTable ( id int, userID int ); create table PeopleTable ( id int, gender char ); insert into ListTable values (1, 1); insert into PeopleTable values (1, 'M'); SELECT COUNT(list.id) AS men FROM ListTable AS list LEFT JOIN PeopleTable AS people ON (list.userID = people.id) WHERE people.gender = 'М'
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear