Giving you an example of problem I am facing creating mysql query. using group_concat or group by is not giving me the result I want.
Can anyone please tell me how can i achieve following results? If it can be solved using procedure or views, it is ok.
user
===============
| Id | UserId |
=====+========|
| 1 | 297 |
---------------
workex
=======================================================
| wid | UserId | title | company |
=====+========+===============+=======================|
| 1 | 297 | software engineer | x |
|----+--------+---------------+-----------------------|
| 2 | 297 | sr software engineer | y |
-------------------------------------------------------
education
=========================================================
| eid | UserId | title | institute |
=====+========+===============+=========================|
| 1 | 297 | computer science | p |
|----+--------+---------------+-------------------------|
| 2 | 297 | MS software engineering | q |
---------------------------------------------------------
Result
=====================================================================================================================================================================================
| userid | workex_title | company | workex_title | company | education | institute |education | institute |
=====+========+===============+======================================================================================================================================================|
| 297 | software engineer | x | sr software engineer | y | computer science | p |sr software engineer | q |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------