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

  • SEARCH
  • Home
  • 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 1051681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:58:25+00:00 2026-05-16T16:58:25+00:00

Why in the first case displays debit = ‘null’, and the second the right

  • 0

Why in the first case displays debit = ‘null’, and the second the right amount

~

SELECT  o.kadastr,             /* Кадастровый номер */
        d.ar_inn,              /* ИНН арендатора */
        o.adres,               /* Адрес участка */
        r.name,                /* ФИО арендатора */
        o.pl_common,           /* Общая плащадь */
        d.arenda_beg,          /* Дата начала ареды */
        d.arenda_end,          /* Дата конца ареды */
        d.dogovor_kadst,       /* Общая кадастровая стоимость */
        rr.ref_str,             /* Вид разрешенного использования */
        ( SELECT SUM(rsh.debit) 
            FROM raschet rsh 
           WHERE rsh.s = 'C' 
             AND rsh.period_y = '2010' 
             AND rsh.dog_no = d.dog_no_fact) debet  /* Годовая арендная плата */
    FROM dogovor d
    INNER JOIN recviz r ON (r.inn_fact = d.ar_inn)
    LEFT JOIN object o ON (o.obj_no = d.obj_no)
    LEFT JOIN ras_refstr rr ON (rr.rasrefstrid = o.object_razr_isp)

~

SELECT SUM(rsh.debit) debit
FROM raschet rsh
WHERE r.dog_no = '1000' 
AND r.s = 'C' 
AND r.period_y = '2010'
  • 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-05-16T16:58:26+00:00Added an answer on May 16, 2026 at 4:58 pm

    debet will be NULL because of this:

    AND rsh.dog_no = d.dog_no_fact
    

    If there’s no rs.dog_no that matches the d.dog_no_fact, the subselect will return NULL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

System.out.println(1+2+3); System.out.println(1+2+3); output:- 33 123 First case is understood but the second case is
Imagine I have a method: void Method(bool parameter){ if(parameter){ // first case } else
I'm playing with Mockito (1.9.5) and stuck at first simple test case: List mockedList
First I'll lay out what I'm trying to achieve in case there's a different
In case user refuse to allow location update when on first time launch. how
I use camel case which has the first letter of all variable names, functions,
In writing Test case as I know, first step/task is to identify the Test
I've read that by standard first part of e-mail is case sensitive, however I've
I'm seeing a case where Action.where(:name => fred).first_or_create is generating incorrect SQL when run
Hi I submitted my first application to the appStore http://itunes.apple.com/at/app/section-control/id343824642?mt=8 This displays English as

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.