-2

I have 3 table EMPLOYEE,HOME,OFFICE

in Employee 2 fields available EMP ID,TAG ,Home has 2 filed Home ID,HTAG and office has 3 fields EMP ID,TAG,OFZname

EMPLOYEE

EmP ID  TAG
1       yellow
2      pink
3       green

Home

Home ID  HTaG
1        pink
2        pink
3        blue

Office

EMP ID TAG OFZname
1     blue mumbai
2     green  chennai

I want a query so that result is

pink 3
blue 2
green 2

by combining 2 table

Richard Telford
  • 9,558
  • 6
  • 38
  • 51

1 Answers1

0

Posting query with punctuation would be better understandable to people who is going to help. Anyway...

Use join to combine two tables those have the information you need should be in join and get them with select and write a where clause with common field id.

Jaccs
  • 1,052
  • 3
  • 12
  • 33