📖 generic · CBSE Class 11 English medium · ACCOUNTANCY · Page 1question

Database Management System · Part 72

Chapter 15: Accounting System Using Database Management System · ACCOUNTANCY

statement that has been used in Chapter-V to prepare the underlying information source of Trial Balance (Model-I.). SELECT Debit As Code, Sum (Amount) As Total FROM VOUCHERS GROUP By Debit ; In the above SQL statement, Sum () has been used to compute the total amount by which the transacted accounts have beeen debited. (b) Min and Max : These functions are used to retrieve respectively the minimum and maximum of value set with respect to field or query expression. For Example, the following SQL statement is capable of returning the amount of minimum and maximum sales transaction in Model-I : SELECT Min (Amount) As MinSales, Max (Amount) As MaxSales FROM Vouchers WHERE Credit = ‘811001’ ; It may be noted that the sales account that is coded as ‘811001’ is credited as and when a sales transaction is recorded.

(c) Count : This function counts the number of records returned by a query. The number of times a sales transaction has occurred and recorded in books of accounts can be known by executing the following SQL statement. SQL statement. SELECT count (*) FROM Vouchers WHERE Credit = ‘811001’ In the above SQL statement, the Credit field stores the account code of sales when a sales transaction occurs.

The WHERE clause restricts the number of records returned by the above SQL to those in which credit field has the account code of sales. Accordingly, the count () function returns the count value of records returned by the above SQL statement. (d) First and Last : These functions are meant to retrieve the first and last record of a value set pertaining to a field or query expression. A- .

Other Functions (a) IIF : The purpose of this function is to provide a value to the field from a mutually exclusive set of values. Its syntax is as given below : IIIF (<Condition>, Value- , Value- ) Wherein <Condition> refers to any logical expression in which a comparison is made by using following comparison operators : = equal to <less than >greater than <= less than or equal to >= greater than

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →