Weclapp

Total purchase amount by supplier

SQL query for WeClapp

Calculate the total purchase amount for each supplier.

SELECT supplier.name, SUM(purchaseInvoice.totalAmount) AS total_purchase_amount FROM supplier INNER JOIN purchaseOrder ON supplier.id = purchaseOrder.supplierId INNER JOIN purchaseInvoice ON purchaseOrder.id = purchaseInvoice.orderId GROUP BY supplier.name

WeClapp data model

Weclapp
Table Accounting Transaction

Weclapp
Table Article

Weclapp
Table Article Custom Attributes

Weclapp
Table Attendance

Weclapp
Table Batch Number

Weclapp
Table Calendar Event

Weclapp
Table Campaign

Weclapp
Table Campaign Participant

Weclapp
Table Contact

Weclapp
Table Contract

Weclapp
Table Currency

Weclapp
Table Crm Event

Weclapp
Table Custom Attribute Definition

Weclapp
Table Incoming Goods

Weclapp
Table Lead

Weclapp
Table Ledger Account

Weclapp
Table Opportunity

Weclapp
Table Party

Weclapp
Table Payment Method

Weclapp
Table Pick

Weclapp
Table Production Order

Weclapp
Table Production Work Schedule

Weclapp
Table Purchase Invoice

Weclapp
Table Purchase Order

Weclapp
Table Quotation

Weclapp
Table Sales Invoice

Weclapp
Table Sales Order

Weclapp
Table Shipment

Weclapp
Table Shipment Method

Weclapp
Table Supplier

Weclapp
Table Tag

Weclapp
Table Ticket

Use SQL on all your SaaS data

Magical SQL for WeClapp with Peliqan.io

Explore data in a rich spreadsheet UI. Use Magical SQL to combine and transform data. SQL queries become new tables that can be shared with business users and used in any BI tool such as Microsoft Power BI, Tableau or Metabase.

Peliqan Ask AI willl write your SQL queries from plain English

Let AI do the work for you

Peliqan’s AI assistant helps you to write SQL queries to get to insights fast. Ask your question in plain English and immediately see the result in Peliqan’s rich spreadsheet viewer.