RUKKENZH
Ask AI
SectionsMiscellaneous
Queries in 1C: How to Retrieve and Verify Accounting Database Data
Article language:🇷🇺 RU🇰🇿 KK🇬🇧 EN🇨🇳 ZH

Queries in 1C: How to Retrieve and Verify Accounting Database Data

СТ
Сапа Т.И. — 1C and accounting expert, practising trainer
Prepared by the BuhGPT editorial team

In 2026, a query in 1C is used to retrieve, filter, group, and compare accounting database data; during a tax audit, these data may be requested on electronic media, and the tax authority is entitled to access the accounting system in use to view them (Articles 160 and 161 of the Tax Code of the Republic of Kazakhstan).

What Is a Query in 1C?

A query is a request for data stored in an information database. It can be used to obtain a list of documents for a period, find transactions involving a counterparty, group amounts by contract, compare information from several objects, or prepare data for a report.

A query is not in itself an accounting document and does not replace source documents, registers, or statutory reporting. It is a tool for retrieving and analysing information that has already been recorded. Therefore, the reliability of its results depends not only on the query text but also on the quality of the source data, the accounting settings, and the condition of the database.

For an accountant, the practical value of queries is that they help answer routine questions more quickly:

  • which documents relate to the selected period;
  • which counterparties or contracts have transactions;
  • where the required analytics are missing;
  • which data were included in the report;
  • why the total in one data selection differs from another.

The 1C query language is designed to work with the objects and mechanisms of the 1C platform. Therefore, structures from another system cannot be transferred without verification: you must first determine where the required information is stored in the specific configuration.

How Query Processing Works

A task usually begins not with writing the query text but with defining the question. For example, the wording “show sales” is insufficient. You need to specify the organisation, period, document type, posting status, currency, business unit, warehouse, and required level of detail.

The data sources are then identified. Depending on the task, they may include directories, documents, tabular sections, or registers. Object names and structures differ between configurations, so a universal query text is not always suitable.

Next, the fields are selected, filtering conditions are set, and grouping is added if necessary. If totals are required, it is important to determine the analytical level in advance. The same amount may be shown by organisation, counterparty, contract, document, or item—and each option answers a different question.

The result should be treated as a working data selection that must be verified. It is convenient to take a short, easily understood period and compare several rows with documents and standard reports. If the totals differ, you need to check the filtering conditions, document status, analytics, dates, and data source.

What the Accountant Should Check

The main risk is obtaining a technically correct table that incorrectly answers the accounting question. To avoid this, before using the result, you should check:

  • whether the correct organisation has been selected;
  • whether the period has been specified correctly;
  • whether only posted documents are included, if required by the task;
  • whether different contracts, warehouses, or business units have been mixed together;
  • whether the required level of detail has been included;
  • whether rows are duplicated when several sources are matched;
  • whether the control total matches a standard report or a verified data selection.

Modified databases require special attention. They may contain additional attributes, modified reports, and non-standard completion rules. After a configuration update, complex external reports and data processors should also be rechecked using a test copy of the database.

A query should not be used as the sole confirmation that tax accounting is correct. During a tax audit, the taxpayer must provide accounting records, documents, and information on paper or electronic media and, at the auditors’ request, provide access to view data in the accounting and tax accounting automation software (Article 161 of the Tax Code of the Republic of Kazakhstan). In such a situation, a query serves as a means of searching for, reconciling, and preparing information, but its results must be compared with the accounting records.

If the documents used to determine taxable items and tax liabilities are missing or are not provided at the tax authority’s request, taxable items may be determined using an indirect method based on information about assets, property, liabilities, turnover, income, and expenses (Article 173 of the Tax Code of the Republic of Kazakhstan). Therefore, discrepancies found by a query should be investigated using the documents rather than corrected only in the final table.

When Customisation or Specialist Assistance Is Required

Simple tasks can sometimes be handled by configuring a standard report: the user selects filters, groupings, and the required fields without modifying the configuration. Before developing a separate solution, it is worth checking whether the required capability is available in the standard functionality of the version in use.

Customisation is justified if it is necessary to regularly combine data from different objects, calculate indicators using an established algorithm, automatically identify discrepancies, or generate a form adopted by the company. To define the task, it is useful to prepare an example of the expected table, descriptions of the columns, filtering rules, and a control result.

When developing a data selection, it is necessary to specify in advance which information relates to source accounting documents, accounting registers, and taxable items. The tax authority may request precisely such data during an audit, including access to view them in the information system in use (Article 160 of the Tax Code of the Republic of Kazakhstan). This makes it possible to verify not only the final amounts but also the ability to consistently drill down from them to the source records.

The taxpayer is entitled to provide a standard audit file—accounting data in an electronic format that permits analysis using the tax authority’s information systems (Article 161 of the Tax Code of the Republic of Kazakhstan). Therefore, a technical solution for routine database checks should be designed so that the user can navigate from a final row to the documents, registers, and analytics used.

If the data selection relates to E-Invoices, Electronic Certificates of Work Performed, an online cash register, or another external service, the completeness of the data upload and the status of the exchange are checked first. A connection error, incomplete synchronisation, or differing filtering periods may cause a correctly constructed query to process less than the entire expected dataset. After the exchange has been restored, the control data selection is generated again and compared with the documents for the same period.

Frequently Asked Questions

Can an accountant work with queries without programming? — Yes, some tasks can be handled through the settings of standard reports. Creating a complex data selection requires an understanding of the data structure of the specific configuration and the accounting rules.

Why do a query and a standard report show different amounts? — This may be caused by different periods, filters, document posting statuses, analytical levels, or data sources. You should compare not only the overall total but also the breakdown by document.

Does a query modify data in the database? — A data selection is intended to retrieve data. However, an external data processor or customisation may include additional actions, so unverified solutions should first be run using a test copy.

Should a query be checked after a 1C update? — Yes, especially if the report or data processor was customised. After an update, you need to ensure that the objects and fields being used are available and that the control result matches the documents and standard reports.

When is a technical analysis of the database required? — It is useful when the reason for a discrepancy is unclear, the database has been substantially modified, the query runs slowly, or the task involves several subsystems and data exchanges. The analysis checks the data sources, filters, table relationships, and the breakdown of the result down to the documents.

Sources

  • Tax Code of the Republic of Kazakhstan, Article 160 “Rights and Obligations of Tax Authority Officials During a Tax Audit”.
  • Tax Code of the Republic of Kazakhstan, Article 161 “Rights and Obligations of the Taxpayer (Tax Agent) During a Tax Audit”.
  • Tax Code of the Republic of Kazakhstan, Article 173 “Determination of Taxable Items and/or Tax-Related Items Using an Indirect Method”.

Frequently asked questions

Can an accountant work with queries without programming?
Yes, some tasks can be handled through the settings of standard reports. Creating a complex data selection requires an understanding of the data structure of the specific configuration and the accounting rules.
Why do a query and a standard report show different amounts?
This may be caused by different periods, filters, document posting statuses, analytical levels, or data sources. You should compare not only the overall total but also the breakdown by document.
Does a query modify data in the database?
A data selection is intended to retrieve data. However, an external data processor or customisation may include additional actions, so unverified solutions should first be run using a test copy.
Should a query be checked after a 1C update?
Yes, especially if the report or data processor was customised. After an update, you need to ensure that the objects and fields being used are available and that the control result matches the documents and standard reports.
When is a technical analysis of the database required?
It is useful when the reason for a discrepancy is unclear, the database has been substantially modified, the query runs slowly, or the task involves several subsystems and data exchanges. The analysis checks the data sources, filters, table relationships, and the breakdown of the result down to the documents.

Read also

Latest answers

Sources

Was this article helpful?
💼 Need help with 1C or accounting? Слава КВЦ — many years of 1C practice in Kazakhstan. Explore the annotated Tax Code of RK 2026 or ask in the BuhGPT chat — answers in seconds.