This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with dummy as ( | |
select 0 as dummy from dual | |
), dept AS ( | |
select 10 as deptno, 'ACCOUNTING' as dname, 'NEW YORK' as loc from dual union all | |
select 20, 'RESEARCH', 'DALLAS' from dual union all | |
select 30, 'SALES', 'CHICAGO' from dual union all | |
select 40, 'OPERATIONS', 'BOSTON' from dual | |
), emp AS ( | |
select 7839 as empno, 'KING' as ename, 'PRESIDENT' as job, null as mgr, date '1981-11-17' as hiredate, 5000 as sal, null as comm, 10 as deptno from dual union all | |
select 7698, 'BLAKE', 'MANAGER', 7839, to_date('1-5-1981','dd-mm-yyyy'), 2850, null, 30 from dummy union all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH dummy (dummy) AS (VALUES | |
(0) | |
), emp (empno, ename, job, mgr, hiredate, sal, comm, deptno) AS (VALUES | |
(7369, 'SMITH', 'CLERK', 7902, DATE '1980-12-17', 800.00, null, 20), | |
(7499, 'ALLEN', 'SALESMAN', 7698, DATE '1981-02-20', 1600.00, 300.00, 30), | |
(7521, 'WARD', 'SALESMAN', 7698, DATE '1981-02-22', 1250.00, 500.00, 30), | |
(7566, 'JONES', 'MANAGER', 7839, DATE '1981-02-04', 2975.00, null, 20), | |
(7654, 'MARTIN', 'SALESMAN', 7698, DATE '1981-09-28', 1250.00, 1400.00, 30), | |
(7698, 'BLAKE', 'MANAGER', 7839, DATE '1981-01-05', 2850.00, null, 30), | |
(7782, 'CLARK', 'MANAGER', 7839, DATE '1981-06-09', 2450.00, null, 10), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with dummy as ( | |
select 0 as dummy | |
), dept AS ( | |
select 10 as deptno, 'ACCOUNTING' as dname, 'NEW YORK' as loc union all | |
select 20, 'RESEARCH', 'DALLAS' union all | |
select 30, 'SALES', 'CHICAGO' union all | |
select 40, 'OPERATIONS', 'BOSTON' | |
), emp AS ( | |
select 7839 as empno, 'KING' as ename, 'PRESIDENT' AS JOB, null AS mgr, date '1981-11-17' as hiredate, 5000 as sal, null as comm, 10 as deptno union all | |
select 7698, 'BLAKE', 'MANAGER', 7839, '1981-05-01', 2850, null, 30 union all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example of using bash commands to track dependency changes in Apache Calcite. | |
# This example compares Calcite 1.27 with 1.28. | |
git checkout calcite-1.27.0 | |
./gradlew dependencies > /tmp/d27.txt | |
git checkout calcite-1.28.0 | |
./gradlew dependencies > /tmp/d28.txt | |
diff -y /tmp/d27.txt /tmp/d28.txt | expand | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (Instructions are based on the "What Your Teammates Have to Do" section | |
# in https://www.git-tower.com/learn/git/faq/git-rename-master-to-main.) | |
# Switch to the "master" branch: | |
$ git checkout master | |
# Rename it to "main": | |
$ git branch -m master main | |
# Get the latest commits (and branches!) from the remote: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally Oracle's demobld.sql. | |
-- | |
-- In a format suitable for pasting into SQL Fiddle for Microsoft SQL Server: | |
-- http://sqlfiddle.com/#!18 | |
begin transaction; | |
create table dept( | |
deptno decimal(2,0) not null, | |
dname varchar(14), | |
loc varchar(13)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script to create, in Google BigQuery, | |
-- Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. | |
-- | |
-- In a format suitable for pasting into Cloud Console. | |
-- Before you run this script, create a dataset called 'Scott' in your current project. | |
-- | |
drop table if exists scott.dept; | |
drop table if exists scott.emp; | |
drop table if exists scott.bonus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally Oracle's demobld.sql. | |
-- | |
-- In a format suitable for pasting into SQL Fiddle for PostgreSQL: | |
-- http://sqlfiddle.com/#!17 | |
create table dept( | |
deptno decimal(2,0) not null, | |
dname varchar(14), | |
loc varchar(13)); | |
create table emp( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally demobld.sql. | |
-- | |
-- In a format suitable for pasting into SQL Fiddle: | |
-- http://sqlfiddle.com/#!4 | |
-- | |
create table dept( | |
deptno number(2,0) not null, | |
dname varchar2(14), | |
loc varchar2(13)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Script to create Oracle's "SCOTT" schema with tables | |
-- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally demobld.sql. | |
-- | |
-- In a format suitable for pasting into RexTester: | |
-- https://rextester.com/l/oracle_online_compiler | |
-- | |
drop table dept | |
\\ | |
drop table emp | |
\\ |
NewerOlder