How to create a SQL query?

0 like 0 dislike
10 views
There are 3 related tables:
spoiler

Table users_signin

id int(11)
oauth_provider enum(", 'linkedin')
oauth_uid varchar(100)
first_name varchar(50)
last_name varchar(50)
email varchar(100)
location varchar(255)
picture varchar(255)
profile_url varchar(255)
created datetime
industry varchar(255)

Table users_positions

users_id int(11)
unique_id int(11)
location varchar(255)
title varchar(255)
startDate varchar(255)
company_id int(11)

users_id connection with users_signin id
company_id - communication with users_company id

Table users_company

id int(11)
unique_id int(11)
industry varchar(255)
name varchar(255)
type varchar(255)
by | 10 views

3 Answers

0 like 0 dislike
I understand the resulting array you just want to group the values for the attributes.
[loc_work] => Array( there are 1 or more ) [profession] => Array(there are 1 or more ) [com_name] => Array(there are 1 or more ) [com_inds] => Array(there are 1 or more )


To do this, you may go for group_concat
\rhttps://dev.mysql.com/doc/refman/8.0/en/group-by-f...
by
0 like 0 dislike
If there are, they should be described, as I understand it You want to join
by
0 like 0 dislike
do JOIN and choose all the data you need from all tables
by

Related questions

0 like 0 dislike
1 answer
asked May 20, 2019 by Dvoeglazov
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 4, 2019 by AronTito
0 like 0 dislike
3 answers
asked Mar 21, 2019 by niko83
0 like 0 dislike
2 answers
asked Jun 3, 2019 by KRHD
110,608 questions
257,186 answers
0 comments
32,810 users