メインコンテンツへスキップ

SUM

List of Functionsで
作成者一覧
公開日: 2019年6月27日|最終更新日: 2022年11月3日

It can sometimes be useful to have a custom field on a ticket to record a number.

If perhaps it is a ticket requesting equipment, you may want to record the number of items that have been issued.

When it comes to reporting on this number you can add entries from multiple tickets together to form a total using the MYSQL SUM function.

A simple example would be the below where #1 is the ticket field id

SELECT SUM(tickets.custom_data[1]) AS 'Total' FROM tickets
copy

Note with this function it does not require the DPQL prefix.

参考になった役に立たない
次のページAVG
前のページDPQL_ALIAS

コメントを投稿するには、ログインまたは登録が必要です。