Skip to content
Advertisement

Tag: relationship

Missing query data when using Sum

My database in Microsoft Access looks like this: Every Client can have many assistants. Every Assistant may have one client or no clients at all. Assistant have a Nice field which is Boolean, indicating whether the Assistant is nice. I need a query where I can get all of the clients, together with a boolean value indicating whether they have

MySQL Query – Pending Friends Approval / Relationship between user & friends

I have two tables: g_relationships (id,request_id,receiver_id,status,approved) g_users (which contains: id,username,…) I have a hard time making a query that adds a temporary column, checks whether userid: 4 exists in request_id or receiver_id column, and take the other userid and fetch username from g_users and adds it to the temporary column. For example: Lets say I have userid 4. I then

Advertisement