Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7726871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:19:10+00:00 2026-06-01T05:19:10+00:00

I have two tables called A and B . Table A contains request details

  • 0

I have two tables called A and B.

Table A contains request details such as
request_id, company_id, and Customer_id.

Table B contains feedback data such as feedback_id, company_id, status_ind,customer_id, score_total.

I need to get the count of rows of table B which has corresponding company_id with table A where the status_ind is 1 and subtract from the count of table A.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:19:11+00:00Added an answer on June 1, 2026 at 5:19 am

    I’m not sure what you’re asking but

    declare @countA integer = (select count(*) from A)
    
    declare @countB integer = 
        (select count(*) from B where 
         exists(select * from A where A.company_id = B.company_id AND A.status_ind = 1)
    
    declare @difference integer = @countA - @countB
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have a database called 'lms' with two tables loan and value, table loan
I have two tables: attractions and cities. Attractions contains a column called city, which
I have two tables: photographs, and photograph_tags. Photograph_tags contains a column called photograph_id (id
I have two fields in a table. One contains values such as BTA, BEA,
I have a table called products, which contains two rows (plus others):price and mfr.
I have two tables job which contains an attribute called employer_id_job that links it
I have two tables, one table is called queuelist and the other is call
I have two tables, one is called video_2, one is called vlan. Table vlan
I have two tables, one contains a list of items which is called watch_list
I have a table called person and it contains two fields, name (TEXT) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.