Jump to content

Query Help


ismael_lopez

Recommended Posts

Hello im trying to achieve something really fancy with my database like explained before, but i really suck with sql and i need some help please, by the way its in mysql but no one in that forum could help me so i posted here

 

table a

column common

column date

column name

column lastname

 

table b

column common

column date

column animal

column plant

column toy

 

table c

column common

column date

column electronic

 

table d

column common

column date

column vehicle

 

 

Lets say i want it to display each name and lastname of every person and display the sum of each animal, plant, toy, electronic and vehicle that each person have at a given date, even if one of them doesnt have a toy.

 

 

 

For example

 

 

 

 

 

name    lastname  animal  plant  toy    electronic  vehicle

 

peter      griffin        2            0          4          5              1

Link to comment
https://forums.phpfreaks.com/topic/235738-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.