sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
{{ config(enabled=var('using_invoices', True)) }}
with invoice as (
select *
from {{ var('invoice') }}
), charge as (
select *
from {{ var('charge') }}
), invoice_line_item as (
select *
from {{ var('invoice_line_item') }}
), customer as (
select *
from {{ va... |
WITH TCURX AS (
-- Joining to this table is necesssary to fix the decimal place of
-- amounts for non-decimal-bASed currencies. SAP stores these amounts
-- offset by a factor of 1/100 within the system (FYI this gets
-- corrected when a user observes these in the GUI) Currencies w/
-- decimals ... |
<reponame>filippovdenis/pg_gatherer<gh_stars>10-100
select
s.slot_name::text as slot_name,
pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), coalesce(s.confirmed_flush_lsn, s.restart_lsn))::bigint as size
from
pg_catalog.pg_replication_slots s; |
<reponame>ARAN1218/awesomebook_BQver<filename>preprocess/010_datetime/05/BQ_datetime05.sql
# 全部JSTに直す
WITH datetime_jst AS (
SELECT
TIMESTAMP(reserve_datetime, "Asia/Tokyo") AS reserve_timestamp,
EXTRACT(MONTH FROM TIMESTAMP(reserve_datetime, "Asia/Tokyo")) AS month
FROM
`awesome-prepr... |
-- @testpoint:opengauss关键字real(非保留),作为角色名
--关键字不带引号-成功
drop role if exists real;
create role real with password '<PASSWORD>' valid until '2020-12-31';
drop role real;
--关键字带双引号-成功
drop role if exists "real";
create role "real" with password '<PASSWORD>' valid until '2020-12-31';
drop role "real";
--关键字带单引号-合理报错
dr... |
insert into INFO_SUPPLIER (name, state, address) values ('Rosas 101', 'GO', 'rua do fornecedor de Goias');
insert into INFO_SUPPLIER (name, state, address) values ('Fortaleza', 'CE', 'rua do fornecedor do Ceara');
insert into PRODUCT (name, state, description, price) values ('Rosas', 'GO', 'rosas',1.99);
insert into PR... |
CREATE TABLE comerciante (
id_comerciante int NOT NULL AUTO_INCREMENT,
nome_comerciante varchar(100) DEFAULT NULL,
email varchar(250) DEFAULT NULL,
CNPJ varchar(20) DEFAULT NULL,
PRIMARY KEY (id_comerciante)
);
CREATE TABLE comercio (
id_comercio int NOT NULL AUTO_INCREMENT,
nome_comercio varchar(120) NO... |
USE [SqlProcTest]
GO
/****** Object: Table [dbo].[EmployeePositionHistory] Script Date: 6/28/2020 6:05:44 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EmployeePositionHistory] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[LastName] NVARCHAR (50) NULL,
... |
<reponame>taufik-rama/maiden
INSERT INTO table_d (id, firstname, lastname) VALUES (uuid(), 'first', 'last');
INSERT INTO table_d (id, firstname, lastname) VALUES (uuid(), 'first', 'last');
INSERT INTO table_d (id, firstname, lastname) VALUES (uuid(), 'first', 'last'); |
USE recipe_app_dev;
INSERT INTO category (description) VALUES ('American');
INSERT INTO category (description) VALUES ('Italian');
INSERT INTO category (description) VALUES ('Mexican');
INSERT INTO category (description) VALUES ('Fast Food'); |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 11, 2021 at 09:22 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>NotTheDBAYoureLookingFor/Resources<filename>Check days since backup.sql
SELECT d.name AS 'Database Name',
MAX(b.backup_finish_date) AS 'Backup Completed @',
DATEDIFF(DAY, MAX(b.backup_finish_date), GETDATE()) AS 'Days Since Backup'
FROM master.sys.databases d
LEFT OUTER JOIN msdb.dbo.backups... |
--插入
CREATE PROCEDURE [dbo].[InsertMessage]
@strTable varchar(50),--表名
@strValues varchar(5000)--要插入的数据(用英文逗号分隔),如果是字符串类型,需加单引号
as
declare @sqlString varchar(5000);
set @sqlString = 'insert into '+@strTable+' values ('+@strValues+')';
exec(@sqlString);
--删除(delete from)
CREATE PROCEDURE [dbo].[DeleteMessage]
@strta... |
TRUNCATE TABLE `states`;
INSERT INTO `states` (`state`, `slug`, `code`, `nickname`, `website`, `admission_date`, `admission_number`, `capital_city`, `capital_url`, `population`, `population_rank`, `constitution_url`, `state_flag_url`, `state_seal_url`, `map_image_url`, `landscape_background_url`, `skyline_background_ur... |
-- crash8.test
--
-- execsql {PRAGMA integrity_check}
PRAGMA integrity_check |
-- file:insert.sql ln:181 expect:true
truncate list_parted
|
<filename>sql/fixtures/textes-applicables.sql
-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 07 Décembre 2015 à 10:15
-- Version du serveur: 1.0.4
-- Version de PHP: 5.4.4-14+deb7u4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
set `planner.slice_target`=1;
select cast(t.data.p_partkey as varchar) from schema_change_empty_batch_part t order by t.data.p_partkey limit 5;
reset `planner.slice_target`;
|
<gh_stars>10-100
CREATE OR REPLACE FUNCTION mart.tf_r_mailchimp_campaign_success_rate()
RETURNS INTEGER AS $$
BEGIN
INSERT INTO mart.mailchimp_campaign_success_rate (
campaign_title
,campaign_type
,used_timewarp
,total_open_to_unique_open_rate
,unique_opens_total
,o... |
ALTER TABLE `am_deploy_component` ADD COLUMN `deploy_options` LONGTEXT NULL AFTER `deploy_ext`; |
ALTER TABLE IF EXISTS dashboard DROP COLUMN IF EXISTS type;
|
DROP TABLE IF EXISTS sys_index_columns
GO
CREATE TABLE sys_index_columns (
sic_name VARCHAR (50),
sic_surname VARCHAR (50)
)
GO
CREATE INDEX sic_test_index
ON sys_index_columns (sic_name)
GO
SELECT COUNT(*) FROM sys.index_columns WHERE object_id = OBJECT_ID('sys_index_columns')
GO
DROP TABLE IF EXISTS sys_index_c... |
-- Drop and create schema
DROP SCHEMA IF EXISTS certauthority;
CREATE SCHEMA certauthority;
-- Workaround for DROP USER IF exists
-- This will create user if already does not exist with USAGE privelages
-- ---------------------
-- Database & User Setup
-- ---------------------
GRANT USAGE ON certauthority.*... |
<reponame>rmr1154/sql-challenge<filename>EmployeeSQL/queries/Analysis_query_3.sql<gh_stars>0
select
d.dept_no
, d.dept_name
, mgr.emp_no as mgr_emp_no
, mgr.last_name as mgr_last_name
, mgr.first_name as mgr_first_name
, dm.from_date
, dm.to_date
from departments as d
inner join dept_manager dm on dm.dept_no = d.dept... |
desc colaboradores;
create table if not exists cursos (
nome varchar(30) not null unique,
descricao text,
carga int UNSIGNED,
totaulas int,
ano year default '2022'
)default charset = utf8;
desc cursos;
alter table cursos
add column idcurso int first;
desc cursos;
alter table cursos
add primary key( idcurso);
desc... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 13 Jun 2021 pada 10.01
-- Versi server: 10.4.19-MariaDB
-- Versi PHP: 7.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
<reponame>jayjung121/Adobe-sign-ETL-Jay
-- drop table dbo.AdobeSign_w4;
CREATE TABLE dbo.AdobeSign_W4(
completed NVARCHAR(100),
email NVARCHAR(500),
AddlWithholding NVARCHAR(100),
Address NVARCHAR(500),
Address2 NVARCHAR(100),
Claiming INT,
Exempt NVARCHAR(100),
FirstName NVARCHAR(100),
Group3 NVARCH... |
<filename>database.sql
CREATE TABLE `adt_alerts` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`dateCreated` varchar(64) DEFAULT NULL,
`alert` varchar(32) DEFAULT NULL,
`zone` varchar(32) DEFAULT NULL,
`location` varchar(64) DEFAULT NULL,
`zone_title` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENG... |
<gh_stars>1-10
# --- !Ups
CREATE INDEX change_history_lookup ON change_history (seq, type);
# --- !Downs
DROP INDEX IF EXISTS change_history_lookup;
|
Create table EGBPA_MSTR_HOLIDAY(
id bigint,
holidayType varchar(14) NOT NULL,
holidayDate date NOT NULL,
description varchar(256),
year varchar(30),
createdby bigint,
createddate timestamp without time zone,
lastmodifiedby bigint,
lastmodifieddate timestamp without time zone,
version bigint
);
AL... |
<reponame>ucdavis/ipa-web<filename>src/main/resources/db/migration/V23__Add_IsComplete_To_TeachingCallStatus.sql
ALTER TABLE `TeachingCallStatuses`
ADD COLUMN `IsComplete` BOOL NOT NULL;
|
CREATE PROC [dbo].[h3giFeaturesRemove]
@featuresList dbo.h3giAddFeaturesType READONLY
AS
BEGIN
UPDATE h3giDeviceForm
SET enabled = 0
WHERE formId IN (SELECT formid FROM @featuresList)
END
GRANT EXECUTE ON h3giFeaturesRemove TO b4nuser
GO
|
<gh_stars>1-10
INSERT INTO REFERENCE_CODES (DOMAIN, CODE, DESCRIPTION, LIST_SEQ, ACTIVE_FLAG, SYSTEM_DATA_FLAG, EXPIRED_DATE, PARENT_DOMAIN, PARENT_CODE)
VALUES ('RELATIONSHIP', 'COM', 'Community Offender Manager', 99, 'Y', 'N', NULL, 'CONTACTS', 'O');
INSERT INTO REFERENCE_CODES (DOMAIN, CODE, DESCRIPTION, LIST_SEQ, ... |
prompt --application/shared_components/globalization/messages
begin
-- Manifest
-- MESSAGES: 138
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>2601326064169245
,p_default_application_id=>138
,p_default_id_offset=>7177882053... |
<filename>src/test/resources/db/prune-reserved/V1__base.sql<gh_stars>100-1000
CREATE TABLE `student_detail`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE `class`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) E... |
<gh_stars>1-10
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "active" SET DEFAULT false;
|
DECLARE @hid HIERARCHYID
SELECT
Col1 = 1,
Col2 = 2,
Col3 = @hid,
Col4 = @hid
|
SELECT COUNT(*) FROM ictrp.ictrp_full_weekly_data;
-- \COPY ictrp."ictrp_weekly_data" FROM 'ICTRPWeek31January2022.csv' DELIMITER ',' CSV QUOTE AS '"' HEADER;
-- \COPY ictrp."ictrp_full_weekly_data" FROM 'ICTRPWeek31January2022.csv' DELIMITER ',' CSV QUOTE AS '"' HEADER;
-- SELECT COUNT(*) FROM ictrp.ictrp_full_we... |
SELECT Department.Name AS Department,
e1.Name AS Employee,
e1.Salary
FROM Employee e1
JOIN Department ON e1.DepartmentId = Department.Id
WHERE 3 > (
SELECT COUNT(DISTINCT e2.Salary)
FROM Employee e2
WHERE e2.Salary > e1.Salary
AND e1.DepartmentId = e2.DepartmentId
);
|
UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856;
|
-- http://www.w3.org/International/articles/language-tags/
-- BIDI Stuff, Arabic and Hebrew
INSERT INTO language_script_bidi(rfc4646_subtag,bidi)
VALUES ( 'Arab', 'rtl');
INSERT INTO language_script_bidi(rfc4646_subtag,bidi)
VALUES ( 'Hebr', 'rtl');
-- Default mappings between script and language subcodes
INSERT INTO... |
<filename>src/main/resources/db/migrations/V1.9__Alter_Subscriptions_Add_Product_FK.sql<gh_stars>0
--- Note that this is completed in k8s via the Dockerfile
--- or via a shell script in non-k8s development envs
--- Add the product id foreign key constraint
ALTER TABLE subscriptions
ADD CONSTRAINT subscriptions_pro... |
<filename>src/main/config/db/create/delete-file.sql
USE [JMS];
DELETE FROM RFI;
DELETE FROM FILE_ACTION;
DELETE FROM JOB_DOC;
DELETE FROM JOB_ACTION;
DELETE FROM JOBS;
DELETE FROM FCA;
DELETE FROM BUILDING_CONTACT;
DELETE FROM BUILDING;
DELETE FROM ALARM_PANEL;
DELETE FROM SAP_HEADER;
DELETE FROM OWNER;
D... |
<gh_stars>0
SET input_format_defaults_for_omitted_fields=1;
CREATE DATABASE IF NOT EXISTS test;
DROP TABLE IF EXISTS defaults;
CREATE TABLE defaults
(
x UInt32,
y UInt32,
a DEFAULT x + y,
b Float32 DEFAULT log(1 + x + y),
c UInt32 DEFAULT 42,
e MATERIALIZED x + y,
f ALIAS x + y
) ENGINE = M... |
#macro($getPhaseByCode(code,codes))
SELECT * FROM phase WHERE status = 0
#if(code)
AND code = :code
#end
#if(codes)
AND code IN (:codes)
#end
ORDER BY sequence ASC,code ASC
#end
#macro($findAllPhase())
SELECT * FROM phase WHERE status=0 ORDER BY sequence ASC,code ASC
#end
|
CREATE ROLE hello WITH PASSWORD '<PASSWORD>';
ALTER ROLE hello WITH LOGIN;
CREATE DATABASE hello OWNER=hello;
GRANT ALL PRIVILEGES ON DATABASE hello TO hello;
\connect hello
CREATE TABLE hits (total int);
INSERT INTO hits (total) VALUES (0);
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO hello;
|
<reponame>venosov/dbt-sql-review
/*
Welcome to your first dbt model!
Did you know that you can also configure models directly within SQL files?
This will override configurations stated in dbt_project.yml
Try changing "table" to "view" below
*/
{{ config(materialized='table') }}
with source_data as (... |
INSERT INTO sui_meta.filter_type(type, name) VALUES('multiple', 'Множественный выбор');
|
-- Deploy cif:tables/funding_stream to pg
begin;
create table cif.funding_stream(
id integer primary key generated always as identity,
name varchar(1000) not null,
description varchar(10000) not null
);
select cif_private.upsert_timestamp_columns('cif', 'funding_stream');
create unique index funding_stream_nam... |
update ACT_GE_PROPERTY set VALUE_ = '6.5.0.0' where NAME_ = 'variable.schema.version';
|
<gh_stars>1-10
CREATE TABLE table5 (x DOUBLE, y DOUBLE) ROW FORMAT DELIMITED FIELDS TERMINATED BY ",";
LOAD DATA LOCAL INPATH '/Users/hduser/workspace/CRegressionRDBM/data/file5.csv' INTO TABLE table5; |
<reponame>zxx1988328/yjy<filename>yii2advanced.sql
-- phpMyAdmin SQL Dump
-- version 4.4.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2015-08-04 18:30:47
-- 服务器版本: 5.5.43-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/... |
<reponame>sergeychernyshev/showslow<filename>cleandata.sql<gh_stars>100-1000
DELETE FROM u_users;
DELETE FROM u_invitation;
DELETE FROM u_googlefriendconnect;
DELETE FROM u_activity;
DELETE FROM user_urls;
DELETE FROM har;
|
create table init_a (a int auto_increment);
insert into init_a values(NULL);
select last_insert_id();
create table aaa (a int);
insert into aaa values (-1);
select last_insert_id();
create serial aa;
insert into aaa values (aa.next_value);
select last_insert_id();
drop table init_a;
drop table aaa;
drop serial aa;
|
create table t ( a int);
alter table t rename column a to b;
desc t;
drop table t;
|
<filename>data/sql/implementation_tag.sql
INSERT INTO `implementation_tag` (`id`, `tag`, `uploader`, `date`) VALUES
(1, 'OpenmlWeka', 16, '2017-03-24 14:26:38'),
(1, 'weka', 16, '2017-03-24 14:26:38'),
(2, 'OpenmlWeka', 16, '2017-03-24 14:26:39'),
(2, 'weka', 16, '2017-03-24 14:26:39'),
(3, 'OpenmlWeka', 16, '2017-03-2... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 13, 2019 at 05:41 PM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... |
create or replace package export_schema is
function get_zip(p_object in varchar2 default 'ALL') return blob;
function get_table(p_table_name in varchar) return clob;
end;
/ |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 01, 2021 at 12:36 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<filename>NH4H_2021/dbo/Tables/tbl_TeamSkillMatch.sql<gh_stars>0
CREATE TABLE [dbo].[tbl_TeamSkillMatch] (
[TeamId] INT NULL,
[SkillId] INT NOT NULL,
CONSTRAINT [FK_tbl_TeamSkillMatch_tbl_Skills] FOREIGN KEY ([SkillId]) REFERENCES [dbo].[tbl_Skills] ([SkillId]),
CONSTRAINT [FK_tbl_TeamSkillMatch_tbl_T... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 31, 2019 at 02:48 AM
-- Server version: 10.4.11-MariaDB-1:10.4.11+maria~bionic
-- PHP Version: 7.2.24-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!401... |
<reponame>christophanneser/Bao-for-Presto<gh_stars>0
SELECT acc.location, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1,
badge as b,
account as acc
WHERE
s.site_id = q1.site_id
AND s.site_id = u1.site_id
AND s.site_id = a1.site_id
AND s.site_id = t1.site_id
AND s.s... |
<reponame>YukiMuraRindon/LeetcodePractice
/*Employee 表包含所有员工,他们的经理也属于员工。每个员工都有一个 Id,此外还有一列对应员工的经理的 Id。
+----+-------+--------+-----------+
| Id | Name | Salary | ManagerId |
+----+-------+--------+-----------+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |
| 3 | Sam | 60000 | NULL |
... |
DELIMITER //
CREATE PROCEDURE usp_withdraw_money(account_id INT, money_amount DECIMAL(19, 4))
BEGIN
IF money_amount > 0
THEN
UPDATE accounts
SET balance = balance - money_amount
WHERE id = account_id AND balance >= money_amount;
END IF;
END; |
CREATE TYPE [dbo].[TJSON]
FROM NVARCHAR (MAX) NULL;
|
<reponame>skreebydba/TransactionLogIntro
USE BigLog;
-- =============================================
-- Create basic stored procedure template
-- =============================================
-- Drop stored procedure if it already exists
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ... |
<filename>Legacy Versions/project-files/database/structure.sql
/*Table structure for table `candies` */
DROP TABLE IF EXISTS `candies`;
CREATE TABLE `candies` (
`candyId` INT(11) NOT NULL AUTO_INCREMENT,
`candyName` VARCHAR(40) NOT NULL,
`candyIcon` VARCHAR(40) NOT NULL,
`nonCandy` TINYINT(1) NOT NULL,
PRI... |
-- Add new command for melee attack
INSERT INTO UnitCommands
(CommandType, Description,
Help, DisabledHelp, Icon, Sound, VisibleInUI, HoldCycling, CategoryInUI, InterfaceMode, PrereqTech, PrereqCivic, MaxEra, HotkeyId, IsModCommand)
VALUES ('MOD_KEYBOARD_NAVIGATION_UNITCOMMAND_MELEE_ATTACK', 'LOC_MORE_KEY_BI... |
alter table user_agents add foreign key (browser_id) references browsers(browser_id) on delete restrict on update restrict;
alter table user_agents add foreign key (system_id) references systems(system_id) on delete restrict on update restrict;
alter table hits alter column path_id drop default;
alter table hits al... |
ALTER TABLE Tiling
ADD UNIQUE (title);
|
<reponame>ihssanehatim/aspen
MERGE (person_jonathan:Person { name: "Jonathan" })
MERGE (person_jack_donaghy:Person { name: "<NAME>" })
MERGE (organization_nbc:Organization { name: "NBC" })
MERGE (person_liz_lemon:Person { name: "<NAME>" })
MERGE (person_jonathan)-[:WORKS_FOR { role: "personal assistant" }]->(person_ja... |
create table a(
a smallint,
b integer,
ba int2,
bb int4,
bc int8,
bd int,
c bigint,
d real,
e double precision,
f smallserial,
g serial,
ga serial2,
gb serial4,
gc serial8,
h bigserial
);
create table b(
a float,
b float(24),
c float4,
e float8
);
create table c(
a nu... |
<filename>sql/updates/0.10/5064_mangos_spell_proc_event.sql
DELETE FROM `spell_proc_event` WHERE `entry` IN (31233,31239,31240,31241,31242);
INSERT INTO `spell_proc_event` VALUES
(31233,0,0,0,8,0x00000009003E0000,0x00020000,0),
(31239,0,0,0,8,0x00000009003E0000,0x00020000,0),
(31240,0,0,0,8,0x00000009003E0000,0x0002... |
-- Up
CREATE TABLE sessions (
sid TEXT PRIMARY KEY,
data TEXT,
expires INTEGER
);
-- Down
DROP TABLE sessions;
|
<reponame>odysseusinc/PatientLevelPrediction
/************************************************************************
@file GetOutcomes.sql
Copyright 2019 Observational Health Data Sciences and Informatics
This file is part of CohortMethod
Licensed under the Apache License, Version 2.0 (the "License");
you may not use... |
<gh_stars>0
CREATE TABLE "users" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"username" TEXT,
"password" TEXT, -- sha256 hash of the plain-text password
"salt" TEXT -- salt that is appended to the password before it is hashed
) |
SELECT * FROM emp
/*BEGIN*/
WHERE /*IF dto.job != "789"*/job = /*dto.job*/'CLERK'/*END*/
/*END*/ |
<filename>src/main/resources/META-INF/examples/dao/EmployeeDao/selectAllEmployeeDepartment.sql
select
e.*,
d.name department_name
from
employee e
left outer join
department d
on
e.department_id = d.id
order by
e.id |
<filename>util_sql/contributing_actors.sql<gh_stars>100-1000
select
-- string_agg(sub.actor, ',')
sub.actor
from (
select distinct a.login as actor
from
gha_events e,
gha_actors a
where
(e.actor_id = a.id or e.dup_actor_login = a.login)
and e.type in (
'PullRequestReviewCommentEvent', 'P... |
<gh_stars>1-10
INSERT INTO "TTABLEOTHERTEST2"("VALUE1", "VALUE2", "VALUE3", "WEIGHT", "LAST_UPDATED") VALUES ('SomethingAAA1', 'testAAAA', 'test1AAAA', 14.5, '02-01-2018 23:42:32');
INSERT INTO "TTABLEOTHERTEST2"("VALUE1", "VALUE2", "VALUE3", "WEIGHT", "LAST_UPDATED") VALUES ('SomethingAAA2', 'testAAAAE', 'test1AAAA', ... |
-- https://docs.snowflake.com/en/sql-reference/account-usage/database_storage_usage_history.html
SELECT DATABASE_NAME, AVERAGE_DATABASE_BYTES, AVERAGE_FAILSAFE_BYTES from "SNOWFLAKE"."ACCOUNT_USAGE"."DATABASE_STORAGE_USAGE_HISTORY" ORDER BY USAGE_DATE DESC LIMIT 1; |
<reponame>MLacra/mapping_generation_experiments<gh_stars>1-10
CREATE TABLE all_schools(
dfe_code text,
local_authority_name text,
local_authority_reference_number text,
school_name text,
executive_headteacher text,
headteacher text,
address_1 text,
address_2 text,
address_3 text,
post_code text,
we... |
<filename>services/headless-lms/migrations/20210216125447_setup_db.down.sql
-- Add down migration script here
DROP TABLE exercise_items;
DROP TABLE exercises;
DROP TABLE pages;
DROP TABLE courses;
DROP TABLE submissions;
DROP TABLE organizations;
|
<reponame>shengjian-tech/opennft
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- https://github.com/seata/seata/tree/develop/script
-- for AT mode you must to init this sql for you business database. the seata server not need it.
CREATE TABLE IF NOT EXISTS `undo_log`
(
`id` BIGINT(20) NOT NULL A... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 21, 2020 at 08:49 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<filename>todo.sql
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 14, 2018 at 10:51 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
SELECT first_name, last_name
FROM person
WHERE last_name LIKE 'C%'
-- WHERE first_name LIKE 'C%';
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 28 avr. 2020 à 09:44
-- Version du serveur : 10.3.15-MariaDB
-- Version de PHP : 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT DISTINCT 'SELECT DISTINCT CONVERT(char(8), GetDate(),112) as TodaysDate,MIN(YEAR(CAST(CAST(['+ a.COLUMN_NAME +'] as VARCHAR(50)) as DATE))) AS MinDate,MAX(YEAR(CAST(CAST(['+ a.COLUMN_NAME +'] as VARCHAR(50)) as DATE))) AS MaxDate,'+CHAR(39)+''+ a.TABLE_CATALOG ... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.1
-- Dumped by pg_dump version 10.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_m... |
DROP DATABASE IF EXISTS `bp_48`;
CREATE DATABASE `bp_48`;
USE `bp_48`;
--
-- Table structure for table `cars`
--
DROP TABLE IF EXISTS `cars`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cars` (
`id` int(4) unsigned NOT NULL AUTO_INCREMENT... |
<filename>database.sql<gh_stars>1-10
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.6.35)
# Database: craftedin
# Generation Time: 2019-02-10 01:00:12 +0000
# ********... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2020 at 10:45 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>src/test/resources/sql/create_function/9cc63729.sql<gh_stars>10-100
-- file:create_table.sql ln:342 expect:true
CREATE FUNCTION const_func () RETURNS int AS $$ SELECT 1
|
<reponame>jeremymeyers/stash-box<filename>pkg/database/migrations/postgres/5_edits.up.sql
CREATE TABLE "edits" (
"id" uuid not null primary key,
"user_id" uuid,
"operation" varchar(10) not null,
"target_type" varchar(10) not null,
"data" jsonb,
"votes" integer not null default 0,
"status" varchar(20) not ... |
/*
Query para publicar a tabela.
Esse é o lugar para:
- modificar nomes, ordem e tipos de colunas
- dar join com outras tabelas
- criar colunas extras (e.g. logs, proporções, etc.)
Qualquer coluna definida aqui deve também existir em `table_config.yaml`.
# Além disso, sinta-se à vontade para alterar alg... |
<reponame>jhajek/Linux-text-book-part-1
GRANT CREATE,SELECT, INSERT, UPDATE, DELETE ON wp.* TO worker@'localhost' IDENTIFIED BY 'cluster';
flush privileges;
|
--
--
insert into KRCR_PARM_T (APPL_ID,NMSPC_CD,CMPNT_CD,PARM_NM,PARM_TYP_CD,VAL,PARM_DESC_TXT,EVAL_OPRTR_CD,OBJ_ID)
values ('KC','KC-GEN','A','US_CITIZEN_OR_NONCITIZEN_NATIONAL_TYPE_CODE','CONFG','1','US citizen or non citizen','A',sys_guid());
insert into KRCR_PARM_T (APPL_ID,NMSPC_CD,CMPNT_CD,PARM_NM,PARM_TYP_CD,... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2020 at 01:45 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>Komzpa/h3-pg
/*
* Copyright 2018-2019 Bytes & Brains
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.