How to write a query statement about adding the values of the same field in SQL statement?

Updated on technology 2024-02-28
4 answers
  1. Anonymous users2024-02-06

    selecta, sum(c)fromtablegroupbya.

    It can solve the problem you said.

    Structured query language.

    SQL) is a special-purpose programming language.

    is a database query and programming language for accessing data and querying, updating, and managing relational database systems; It is also an extension for database script files.

    Structured Query Language is a high-level, non-procedural programming language that allows users to structure data at a high level.

    on the job. It does not require the user to specify the storage method of the data, nor does it require the user to understand the specific data storage method, so different database systems with completely different underlying structures can use the same structured query language as the interface for data input and management. Structured Query Language statements can be nested, which makes it extremely flexible and powerful.

    In October 1986, the American National Standards Institute standardized SQL as a relational database management system.

    The standard language (ANSI X3.)135-1986), which became an international standard in 1987 with the support of the International Standards Organization. There are five types of data in a structured query language: character, text, numeric, logical, and date.

  2. Anonymous users2024-02-05

    select sum(c.value) group by aValue. See if this meets your needs.

  3. Anonymous users2024-02-04

    select a, sum(c) from table name group by a order by a;

    That's it.

  4. Anonymous users2024-02-03

    Tools Material: Management Studio.

    1. First, on the desktop, click on the "Management Studio" icon.

    2. After that, in the interface, click on the "New Query" option in the upper left corner.

    3. Then, in this interface, enter the SQL statement "Select Sum(BonusPenaltyMoney) from MySGBONUSPontyMoney) from MySGBONUSPENALTY Group by SGprojectNO" to query a field in different tables according to the different values of a field.

    4. Then in the interface, click the "Execute" button on the top left.

    5. Finally, in this interface, the value of another field of the same column is displayed.

Related questions
9 answers2024-02-28

Tools Material: Management Studio.

1. First, on the desktop, click on the "Management Studio" icon. >>>More

5 answers2024-02-28

Since you don't know the primary key in your t hy cus install table, it's safer to use exists. >>>More

4 answers2024-02-28

Generally refers to indexing. You don't have to.

10 answers2024-02-28

The join joins combine the field records in two tables, including three types: >>>More

7 answers2024-02-28

The next graphical interface of the MSSQL management tool. A lot. You take a look. Imports are usually available in the graphical interface. >>>More