Skip to main content

Peliqan

Ziggu

Customers with the most units

SQL query for Ziggu

Get the customers with the highest number of purchased units in Ziggu.

SELECT customers.name, COUNT(units.id) AS total_units FROM customers JOIN unit_customers ON customers.id = unit_customers.customer_id JOIN units ON unit_customers.unit_id = units.id GROUP BY customers.name ORDER BY total_units DESC LIMIT 10

Ziggu data model

Ziggu
Attachment Categories

Ziggu
Buildings

Ziggu
Companies

Ziggu
Customers

Ziggu
Decision Type Categories

Ziggu
Decision Types

Ziggu
Decisions

Ziggu
Documents

Ziggu
Employees

Ziggu
Fractions

Ziggu
Installments

Ziggu
Issue Categories

Ziggu
Issue List Types

Ziggu
Issue Lists

Ziggu
Issue Statuses

Ziggu
Issues

Ziggu
Lots

Ziggu
Messages

Ziggu
Partners

Ziggu
Phases

Ziggu
Projects

Ziggu
Proposals

Ziggu
Spaces

Ziggu
Ticket Categories

Ziggu
Tickets

Ziggu
Unit Customers

Ziggu
Units

Ziggu
Units Of Customer

Ziggu
Units Of Project

Ready to get instant access to all your company data ?​

Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.