Skip to content
Advertisement

SQL Query how to add non existing column [closed]

Hello guys i need help im stuck dont bully me for this i know it can be easy for you but im just bad at thinking lol 😀 read few times the manual on w3school and etc but still dont understand this nonsense

i need and sql query which can count how many real estate objects agent has , the database that im currently working on sql is about real estate its in lithuanian , the task is to list agent name(AgVardas), surname(AgPavardė) , phone (AgTelefonas), agency name(AgentūrosPavadinimas), and real estate objects(Nekilnojamuobektuskaicius) that agent has. The names in () these brackets are original values in my native language (Lithuanian)
i have to use the query with inner join because its in other tables

the databases https://imgur.com/a/qa1JUWt

the code query i have tried is

it works and all but i need to add another column to show me Real estate objects that agent owns(number)

example how it should look

https://imgur.com/a/TMAARKC

So the question is how to do so?

Advertisement

Answer

You can replace the column and table names in the below query with your Lithuanian names and it should work.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement