Its a simple aggregation query without a need of sub query like:
SELECT name, SUM(AMOUNT)
FROM Orders
GROUP BY name
More Related Contents:
- What is the difference between UNION and UNION ALL?
- How can I do an UPDATE statement with JOIN in SQL Server?
- Recommended SQL database design for tags or tagging [closed]
- Select First Row of Every Group in sql [duplicate]
- The multi-part identifier could not be bound
- must appear in the GROUP BY clause or be used in an aggregate function
- How to insert a line break in a SQL Server VARCHAR/NVARCHAR string
- MySQL number of items within “in clause”
- GROUP BY / aggregate function confusion in SQL
- Possible to perform cross-database queries with PostgreSQL?
- SQL Query to get aggregated result in comma separators along with group by column in SQL Server
- Mixing implicit and explicit JOINs
- Fastest way to update 120 Million records
- Calendar Table – Week number of month
- how can I Update top 100 records in sql server
- What’s the proper index for querying structures in arrays in Postgres jsonb?
- How can I have NHibernate only generate the SQL without executing it?
- get next sequence value from database using hibernate
- Selecting Random Rows in MySQL
- concatenate two database columns into one resultset column
- SQLite and custom order by
- Update a table with join?
- How can I compare time in SQL Server?
- Is there any way to flush output from PL/SQL in Oracle?
- SELECT from table with Varying IN list in WHERE clause
- Combine two columns and add into one new column
- Improve SQL Server query performance on large tables
- Timestamp Difference In Hours for PostgreSQL
- Show all rows that have certain columns duplicated
- T-SQL Skip Take Stored Procedure