13.07.2015 Views

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

To perform this query, the result will be automatically grouped by customer name, by zip code and by city.Data source of thequeryJoins (see page201 formore details)Selection conditions (seepage 196 for moredetails)Sorting the records (seepage 193 for moredetails)Result items of thequeryThe SQL code of the query can be viewed at any time:• On the "Home" pane, in the "General" group, expand and select "SQL code".• Select "SQL code" (shortcut: [F2]) from the popup menu of the query.In our example, the generated SQL code is as follows:SELECT CUSTOMER.CustomerLName AS CustomerLName,CUSTOMER.ZipCode AS ZipCode,CUSTOMER.City AS City,SUM(ORDERS.TotalIOT) AS sum_TotalIOTFROM CUSTOMER, ORDERSWHERE CUSTOMER.CustNum = ORDERS.CustNumAND CUSTOMER.ZipCode LIKE ’75%’GROUP BY CUSTOMER.Name, CUSTOMER.ZipCode, CUSTOMER.CityHAVING SUM(ORDERS.TotalIOT) > 3000ORDER BY sum_TotalIOT ASC168Part 2: Query editor

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!