Tags » GROUP BY

SQL Aggregate Functions

Calculations to be performed on multiple rows can be done using aggregate functions.

The functions available are as follows:

Sql

OBIEE: BY clause for group by

Within Oracle BI Answers (and only within BI Answers and not within the Metadata model), the BY clause can be used in conjunction with a… 143 more words

Oracle BI Enterprise Edition

Grouping dates without blocking operators

It’s not entirely uncommon to want to group by a computed expression in an aggregation query. The trouble is, whenever you group by a computed expression, SQL Server considers the ordering of the data to be lost, and this will turn your buttery-smooth Stream Aggregate operation into a Hash Match (aggregate) or create a corrective Sort operation, both of which are… 1,206 more words

T-SQL

Count Specific character from String using oracle sql

Simple Query to find the Specific character from a string.

Let us consider, a String ‘thisisagoodplace’ and want to find the count of ‘a’ in the string this below query will work. 30 more words

Plsql Posts

Oracle Assignment 6

  1. The following two tables are used to store Employee and their salary records.
CREATE TABLE EMPLOYEE (EMP_ID NUMBER GENERATED ALWAYS AS IDENTITY,
NAME VARCHAR2(50) NOT NULL,
DATE_OF_BIRTH DATE NOT NULL,
DESIGNATION VARCHAR2(50) NOT NULL,
DATE_OF_JOINING DATE,
DATE_OF_RESIGNATION DATE,
LAST_WORKING_DAY DATE,
CONSTRAINT EMPLOYEE_PK PRIMARY KEY(EMP_ID));

CREATE TABLE EMPLOYEE_SALARY(EMP_ID NUMBER NOT NULL,
MONTH NUMBER(2) NOT NULL,
YEAR NUMBER(4) NOT NULL,
GROSS_EARNINGS NUMBER(10,2) NOT NULL,
DEDUCTIONS NUMBER(10,2) DEFAULT 0 ON NULL,
NET_SALARY AS (TOTAL_EARNINGS - TOTAL_DEDUCTIONS),
CONSTRAINT EMPLOYEE_SALARY_PK PRIMARY KEY (EMP_ID),
CONSTRAINT EMPLOYEE_SALARY_FK1 FOREIGN KEY (EMP_ID) 
REFERENCES EMPLOYEE(EMP_ID)); 610 more words
Database

Oracle Assignment 5

  1. Write a function which checks whether the year passed to it is current year. If it is current year then the function should return 1 otherwise it should return 0.
  2. 601 more words
Database