0

I have a table which keeps the record for letter send by different department to different region(A,B,C) in Hindi or English language as given in the table.

Tblltr image

I want to count the number of letter send by Each Department to Region A,B,C in Hindi And English as per the result table.

Result table

I am able to get this for all department together but not able to do is as per Department. Kindly guide me get that result.my query for all record.

select count(LtrNo) from tblltr where REGION="A" and Language="Hindi" 
select count(LtrNo) from tblltr where REGION="A"and Language="English"
select count(LtrNo) from tblltr where REGION="B" and Language="Hindi"
select count(LtrNo) from tblltr where REGION="B" and Language="English"
select count(LtrNo) from tblltr where REGION="C" and Language="Hindi"
select count(LtrNo) from tblltr where REGION="C" and Language="English" 

Fiddle for this is Fiddle

leraner
  • 71
  • 6
  • Do not add "Not a Duplicate" to your question's title/body. If you feel this question has been closed incorrectly, add a comment here and explain ***why*** you feel this is not a duplicate. – Tim Lewis Apr 24 '23 at 17:32
  • @TimLewis Ok Bro But why people are more interested in closing rather thn providing a solution. – leraner Apr 24 '23 at 17:33
  • 1
    Because they believe the solution is in the posted Duplicate (and it probably is). Did you look at the duplicate and try to figure that out? Again, why do you think the duplicate doesn't provide the answer? – Tim Lewis Apr 24 '23 at 17:34
  • Mysql Union operator allows us to combine two or more results from multiple query.Try implmenting this – gorakh Apr 24 '23 at 17:37
  • @TimLewis If some one posting any query It means that he is not much familiar with the topic .The solution may be there in the duplicate one but he may not be able to get it from that .That why I m requesting you to help me with this context.please. – leraner Apr 24 '23 at 17:39
  • 1
    I don't know the answer, I'm just doing the housecleaning (getting rid of your "not a duplicate" things in the question). If Barmar (who is one of the most respected posters in the SQL category) has marked your question as a duplicate, it's for a reason. You're welcome to ping them and ask for clarification on why they think it is a duplicate, all I'm saying is to simply refrain from adding that stuff to your question. – Tim Lewis Apr 24 '23 at 17:43
  • 1
    @leraner not related to the question, but why haven't you accepted any of the answers provided in your other questions ? There are still questions asking for clearance unanswered . People spend time answer the question and it will benefit others as well. And please do not post images of code use text only. I can't create testing environment from images – Ergest Basha Apr 24 '23 at 17:48
  • @leraner[Tips for asking a good Structured Query Language (SQL) question](https://meta.stackoverflow.com/questions/271055/tips-for-asking-a-good-structured-query-language-sql-question) , #5 and #3 – Ergest Basha Apr 24 '23 at 17:49
  • @ErgestBasha Can you guide me for solution of my problem. – leraner Apr 24 '23 at 17:49

0 Answers0