sql stringlengths 6 1.05M |
|---|
-- @testpoint: 文本检索操作符||,连接两个tsvector类型的词汇
select 'a b'::tsvector || 'c:1 d:2 b:3'::tsvector as result; |
IF EXISTS ( SELECT *
FROM sys.objects
WHERE object_id = OBJECT_ID(N'pa.fn_get_inicio_promedio_vacacion')
AND type IN ( N'TF', N'FN', N'IF' ) )
/****** Object: UserDefinedFunction [pa].[fn_get_inicio_promedio_vacacion] Script Date: 16-01-2017 3:30:08 PM ******/
DRO... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 31, 2020 at 03:24 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: emotiondb
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
select n.subject_id, n.hadm_id, n.icustay_id,h.admission_time as ICU_admitted, n.first_measurement, h.last_measurement,
n.HCO3_1st,
h.HCO3_24,
round( h.HCO3_24- n.HCO3_1st ,4) as hco3_difference
from `hst-953-2018.team_h.hco3_1st` as n
left join `hst-953-2018.team_h.hco3_24` as h
on n.icustay_id = h.icustay_id and h.... |
<filename>apps/database/db/structure.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.2
-- Dumped by pg_dump version 12.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_... |
<filename>Patches/Pre_Alpha_1/Raw_SQL/zones_DATA.sql<gh_stars>1-10
USE perpetuumsa
GO
UPDATE zones
SET
active = 0
,[enabled] = 0
WHERE
id IN (1, 2, 6, 7, 22, 25, 30, 35, 36, 39)
UPDATE zones
SET
x = 4000
,y = 1000
WHERE
id = 0
UPDATE zones
SET
x = 0
,y = -750
WHERE
id = 3
UPDATE zones
SET
x = -5000
,y =... |
-- Reverse default constraints
ALTER TABLE employee DROP FOREIGN KEY employee_ibfk_1;
ALTER TABLE employee DROP FOREIGN KEY employee_ibfk_2;
-- Insert mock data into tables to initialize fields
INSERT INTO department (dept_name)
VALUES ("Sales"),
("Business Development"),
("Human Resources"),
... |
CREATE TABLE IF NOT EXISTS `wp_reguserid` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`userid` int(10) NOT NULL DEFAULT 0 COMMENT '考勤号',
`p_phone` varchar(100) NOT NULL DEFAULT 0 COMMENT '家长手机号',
`pri_key` varchar(20) NOT NULL DEFAULT 0 COMMENT '密钥',
`ctime` varchar(30) NOT NULL COMMENT '... |
<reponame>PHJpeng/admin_shang
/*
Navicat Premium Data Transfer
Source Server : 新服务器192.168.127.12
Source Server Type : MySQL
Source Server Version : 50728
Source Host : rm-j6cl5jij0m628n6sdoo.mysql.rds.aliyuncs.com:3306
Source Schema : app_shang
Target Server Type : MySQL
Targe... |
<reponame>nus-ncl/common-interface
-- -----------------------------------------------------
-- Table `prod`.`team_quotas`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `prod`.`team_quotas` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`created_date` DATE... |
<reponame>ooknight/ebean
-- Migrationscripts for ebean unittest
-- apply changes
create table migtest_ckey_assoc (
id integer generated by default as identity not null,
assoc_one varchar(255),
constraint pk_migtest_ckey_assoc primary key (id)
);
create table migtest... |
<gh_stars>0
SELECT schemaname as schema,
relname as tables,
idx_tup_fetch + seq_tup_read as TotalReads
FROM pg_stat_all_tables
WHERE idx_tup_fetch + seq_tup_read = 0
AND schemaname NOT IN ('pg_catalog', 'pg_toast')
ORDER BY schemaname,
relname; |
INSERT INTO authors (author_id, name, gender, birthdate)
VALUES (1, '<NAME>', 'MALE', '1959-06-16');
|
CREATE TABLE catalogs
(
catalog_id NVARCHAR(50) NOT NULL,
name NVARCHAR(50) NOT NULL,
topic_ids NVARCHAR(2048),
tech_owner_id NVARCHAR(50),
biz_owner_id NVARCHAR(50),
tags NVARCHAR(2048),
description NVARCHAR(1024),
tenant_id NVARCH... |
<filename>TINAPA/src/main/res/raw/database_update_v2.sql
ALTER TABLE "planned_teams" RENAME TO "planned_teams_orig";
CREATE TABLE "planned_teams" ("id" INTEGER PRIMARY KEY NOT NULL DEFAULT (null) ,"name" TEXT,"planned_pokemon1_id" INTEGER DEFAULT (null) ,"planned_pokemon2_id" INTEGER DEFAULT (null) ,"planned_pokemon3... |
CREATE TABLE [dbo].[Award] (
[AID] INT IDENTITY (1, 1) NOT NULL,
[AwardName] VARCHAR (80) NULL,
[BadgeID] INT CONSTRAINT [DF_Award_BadgeID] DEFAULT ((0)) NULL,
[NumPoints] INT CONSTRAINT [DF_Award_NumPoints] DEFAULT ((0)) NULL,
[BranchID] ... |
/*
Navicat Premium Data Transfer
Source Server : docker-mysql02
Source Server Type : MySQL
Source Server Version : 80020
Source Host : localhost:3305
Source Schema : hwr
Target Server Type : MySQL
Target Server Version : 80020
File Encoding : 65001
Date: 28/06/2020 0... |
<filename>Oracle SQL/The PADS.sql
select name || '(' || SUBSTR(occupation,0,1) || ')' from occupations order by name asc, occupation;
select 'There are a total of ' || count(occupation) || ' ' || lower(occupation) || 's.' from occupations group by occupation order by count(occupation), occupation asc; |
<reponame>Quebe/Mercury-Care-Management
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'MemberCase_Unlock' AND type = 'P'))
DROP PROCEDURE dbo.MemberCase_Unlock
GO
*/
CREATE PROCEDURE dbo.MemberCase_Unlock
/* STORED PROCEDURE - INPUTS (BEGIN) */
@memberCaseId BIGINT,
@i... |
-- =============================================
-- Create procedure SF_DeleteAccount
-- Stored procedure example for doing deletes by Id on Account
-- Usage:
-- exec SF_DeleteAccount '00130000008hz55AAA'
--
-- Execute this script to add the SF_DeleteAccount proc to your database before usage
-- ===================... |
<filename>hr2-java-parent/hr2-backend-impl/src/main/resources/initscripts/34.sql
CREATE TABLE EMAIL_TEMPLATE
(
ID INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
TYPE VARCHAR(60) NOT NULL,
CONTENT LONGTEXT NOT NULL,
CONSTRAINT UC_EMAIL_TEMPLATE_TYPE UNIQUE(TYPE)
)
/
INSERT INTO EMAIL_TEMPLATE (T... |
<reponame>getwasim/egov-smartcity-suites-test<filename>egov/egov-works/src/main/resources/db/migration/main/V20160322123350__works_role_action_super_user.sql<gh_stars>1-10
---------------Map the Action urls to the Super User role--------------------
INSERT INTO eg_roleaction(roleid, actionid) VALUES ((select id from eg... |
<reponame>chaomi1998/cocdan
DROP TABLE IF EXISTS users;
--;;
DROP TABLE IF EXISTS avatars;
--;;
DROP TABLE IF EXISTS messages;
--;;
DROP TABLE IF EXISTS stages;
--;;
DROP TABLE IF EXISTS stage_avatar; |
<gh_stars>10-100
-- file:create_table.sql ln:675 expect:true
create table perm_parted (a int) partition by list (a)
|
-- file:json.sql ln:584 expect:true
SELECT json_build_array(VARIADIC '{1,2,3,4}'::int[])
|
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/select/f23a545d.sql
-- file:box.sql ln:167 expect:true
SELECT * FROM box_temp WHERE f1 |>> '(37,38),(39,40)'
|
<reponame>overachiever-productions/s4
/*
NOTES:
- This sproc adheres to the PROJECT/REPLY usage convention.
- WARNING: This script does what it says - it'll remove OFFSITE files exactly as specified.
- Not yet documented.
- Similar to dbo.remove_backup_files but, obviously, for offsite... |
delete T1 from QUESTIONNAIRE_QUESTIONS where QUESTIONNAIRE_QUESTIONS_ID in (select T1.QUESTIONNAIRE_QUESTIONS_ID
from QUESTIONNAIRE_QUESTIONS T1, QUESTIONNAIRE_QUESTIONS T2
where T1.QUESTION_NUMBER = T2.QUESTION_NUMBER and T1.PARENT_QUESTION_NUMBER = T2.PARENT_QUESTION_NUMBER
and T1.QUESTIONNAIRE_REF_ID_FK... |
<gh_stars>0
INSERT INTO burgers(burger_name,devoured) VALUES("Cheese Burger",false);
INSERT INTO burgers(burger_name,devoured) VALUES("Bacon Cheese Burger",false);
SELECT * FROM burgers; |
<reponame>rstens/gwells
DROP FUNCTION IF EXISTS db_replicate(boolean);
/*** NOTE: There is no refresh of the static Code Tables, as that is dependent upon, and done during
GWELLS Application code deployment.
This driver SQL script is meant to be run from the Database Pod, during scheduled nightly
... |
SELECT table_schema AS table_schema
,count(CASE WHEN engine = 'MEMORY' THEN table_name ELSE NULL END) AS 'MEMORY'
,count(CASE WHEN engine = 'InnoDB' THEN table_name ELSE NULL END) AS 'InnoDB'
,count(CASE WHEN engine = NULL THEN table_name ELSE NULL END) AS ''
,count(CASE WHEN engine = 'MyISAM' THEN table_name ELSE ... |
-- $Id$
-- Description: reports now are hard deleted
alter table report_band_definition drop CONSTRAINT fk_report_band_definition_to_report_band_definition^
alter table report_band_definition add CONSTRAINT fk_report_band_definition_to_report_band_definition FOREIGN KEY (parent_definition_id)
REFERENCES r... |
<reponame>bcgov/cas-ciip-portal
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(2);
select has_function(
'ggircs_portal', 'init_application_administration_form_result', array['integer', 'integer'],
'Function init_application_administration_f... |
/********************************************************************************
component-centric-snapshot-historical-association-active-target
Assertion:
Active historical association refset members have active or limited status
concepts as targets.
***********************************************************... |
CREATE OR REPLACE PROCEDURE DELETECOUNTRY
(vCountryCode IN Country.CountryCode%TYPE
)
AS
BEGIN
DELETE FROM Country where CountryCode=vCountryCode;
END;
/
|
-- Tags: no-replicated-database
-- Tag no-replicated-database: Does not support renaming of multiple tables in single query
DROP TABLE IF EXISTS test1_00634;
DROP TABLE IF EXISTS test2_00634;
DROP TABLE IF EXISTS v_test1;
DROP TABLE IF EXISTS v_test2;
DROP TABLE IF EXISTS v_test11;
DROP TABLE IF EXISTS v_test22;
crea... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Фев 22 2020 г., 13:30
-- Версия сервера: 5.5.62
-- Версия PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
--pass time type/format argument
--TEST: pass only one argument
select trunc(time'15:23:56');
select trunc('15:23:56');
--TEST: pass time type argument, select directly
select trunc(time'15:23:56', 'yyyy');
select trunc(time'15:23:56', 'yy');
select trunc(time'12/20/1999 15:23:56', 'q');
select trunc(time'15:23:56'... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 27, 2020 at 02:36 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>Demonliquid/cars-python-cleaning<gh_stars>0
USE costarica;
CREATE TABLE `costaricaoriginal` (
`IDENTIFICACION DEL VEHICULO` VARCHAR(50),
`TIPO IDENTIFICACION` VARCHAR(50),
`CODIGO MARCA` int,
`VELOCIDADES` VARCHAR(50),
`TRANSMISION` VARCHAR(50),
`TRACCION` VARCHAR(50),
`TECHO` VARCHAR(50),
`PUERTAS` VARCHAR(5... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 25, 2017 at 09:10 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
<reponame>AhyaanTech/QuranWordHasura
drop table if exists "word_data";
do $$
begin
create table if not exists "word_data" (
"word_id" int generated by default as identity not null,
"word_surah" int default null,
"word_ayah" int default null,
"word_page" int default null,
"word_number_in_quran" int... |
-- MySQL dump 10.13 Distrib 5.5.35, for Win32 (x86)
--
-- Host: localhost Database: monitoring_db
-- ------------------------------------------------------
-- Server version 5.5.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
DROP TABLE IF EXISTS student, teacher, class, class_student, roster, course;
DROP TYPE IF EXISTS SEX;
CREATE TYPE SEX as ENUM ('man', 'vrouw', 'onbepaald', 'onbekend');
CREATE TABLE student (
studentnumber CHAR(7) UNIQUE NOT NULL,
firstname VARCHAR(255) NOT NULL,
lastname VARCHAR(255) NOT NULL,
insert... |
CREATE TABLE "Medevent" (
"id" SERIAL CONSTRAINT "pk_medevent" PRIMARY KEY
);
CREATE TABLE "casecategory" (
"id" SERIAL CONSTRAINT "pk_casecategory" PRIMARY KEY,
"indictable" BOOLEAN
);
CREATE TABLE "causeofaction" (
"id" SERIAL CONSTRAINT "pk_causeofaction" PRIMARY KEY,
"criminal" BOOLEAN NOT NULL,
"pare... |
<gh_stars>1-10
ALTER TABLE nodes DROP COLUMN lat;
ALTER TABLE nodes ADD COLUMN lat REAL NOT NULL;
ALTER TABLE nodes DROP COLUMN lon;
ALTER TABLE nodes ADD COLUMN lon REAL NOT NULL;
|
<reponame>georgidelchev/CSharp-Databases
CREATE TABLE Functions
(
Id INT PRIMARY KEY IDENTITY,
X INT,
Y INT
)
INSERT INTO Functions(X, Y)
VALUES (20, 20),
(20, 20),
(20, 21),
(23, 22),
(22, 23),
(21, 20)
SELECT f1.X, f1.Y
FROM Functions AS f... |
-- Verify seattleflu/schema:functions/barcode_slices on pg
begin;
create temporary table tests (
input citext,
expected citext[]
);
insert into tests values ('abcdefg1','{1__ab,2__bc,3__cd,4__de,5__ef,6__fg,7__g1}'); -- even number of chars
insert into tests values ('abcdefg1234','{1__ab,2__bc,3__cd,4__de,5_... |
<reponame>Shuttl-Tech/antlr_psql
-- file:numeric.sql ln:617 expect:true
INSERT INTO num_result SELECT id, 0, LOG(numeric '10', ABS(val))
FROM num_data
WHERE val != '0.0'
|
<filename>src/test/resources/sql/create/55c6d644.sql
-- file:object_address.sql ln:43 expect:true
CREATE SUBSCRIPTION addr_sub CONNECTION '' PUBLICATION bar WITH (connect = false, slot_name = NONE)
|
<filename>migrations/0047_add-default-label_colors.up.sql
INSERT INTO label_color (color_hex, position, name ) VALUES ( 'transparent', 0.0, 'no_color' );
INSERT INTO label_color (color_hex, position, name ) VALUES ( '#e8384f', 1.0, 'red' );
INSERT INTO label_color (color_hex, position, name ) VALUES ( '#fd612c', 2.0, '... |
<reponame>oramake/oramake-framework<filename>Module/OraMakeSystem/SqlScript/OmsInternal/nothing.sql<gh_stars>0
--script: OmsInternal/nothing.sql
--Пустой скрипт, ничего не делает.
--
--Замечания:
-- - вызывается из скрита <oms-run.sql> в случае, если не нужно выполнять
-- пользовательский скрипт ( т.к. команда... |
begin;
create schema data_commons;
create table if not exists data_commons.domain_registry(
id serial primary key,
term_schema text not null,
term_table text not null,
rel_type_schema text not null,
rel_type_table text not null,
path_schema text not null,
path_table text not null,
unique(term_s... |
SET 'auto.offset.reset' = 'earliest';
-- Create stream of sales_orders
CREATE STREAM sales_orders (
order_id BIGINT,
customer_id BIGINT,
item VARCHAR,
order_total_usd DECIMAL(10,2)
) WITH (
KAFKA_TOPIC = 'sales_orders',
VALUE_FORMAT = 'JSON',
PARTITIONS = 6
);
-- Register the customer data topic as a ta... |
<filename>src/main/resources/templates/db_scripts/migration_scripts/rename_progress_current_to_exported.sql<gh_stars>1-10
UPDATE ${myuniversity}_${mymodule}.job_executions
SET jsonb = jsonb_set(jsonb #- '{progress, current}', '{progress, exported}', jsonb -> 'progress' -> 'current')
WHERE jsonb -> 'progress' -> 'curren... |
<gh_stars>100-1000
/*
* Copyright 2015 herd contributors
*
* 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 by applicable l... |
update ACT_GE_PROPERTY set VALUE_ = '6.5.1.6' where NAME_ = 'common.schema.version';
|
<reponame>mastapegs/ji-cloud
alter table user_profile
alter persona type text[] using array[persona];
|
-- phpMyAdmin SQL Dump
-- version 4.5.0.2
-- http://www.phpmyadmin.net
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLA... |
<filename>sql/_04_operator_function/_03_string_op/_011_lower/cases/1008.sql<gh_stars>1-10
--[er]test lower function with timestamp type
select lower(to_timestamp('10:10:10 am')) from db_root order by 1; |
<filename>mj-20180321.sql<gh_stars>0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- ------------------------------------... |
<filename>10.Spring-Boot-Ehcache-Cache/src/main/resources/init.sql
CREATE TABLE if not exists STUDENT
(
SNO VARCHAR(2) NOT NULL,
SNAME VARCHAR(9) NOT NULL,
SSEX CHAR(2) NOT NULL
);
INSERT INTO STUDENT VALUES ('001', 'KangKang', 'M ');
INSERT INTO STUDENT VALUES ('002', 'Mike', 'M ');
INSERT INTO STUDE... |
UPDATE users SET
enabled = $enabled
WHERE
rowid = $id
|
-- Initialized users authentications:
-- User:
-- username: pesho
-- password: <PASSWORD>
-- Admin:
-- username: admin
-- password: <PASSWORD>
INSERT INTO categories (`name`)
values ('MOUNTAIN'),
('CITY'),
('SEASIDE'),
('ECO_FRIENDLY');
INSERT INTO roles (`role`)
values ('USER'),
... |
<filename>migrations/sqls/20190508102441-authentication-down.sql
DROP TABLE omnicloud.auth_clients;
|
IF OBJECT_ID('zsystem.Versions_Check') IS NOT NULL
DROP PROCEDURE zsystem.Versions_Check
GO
CREATE PROCEDURE zsystem.Versions_Check
@developer varchar(20) = NULL
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE @developers TABLE (developer varchar(20))
IF @developer IS NULL
B... |
SET ANSI_NULLS ON;
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET ANSI_NULL_DFLT_ON ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET QUOTED_IDENTIFIER ON;
go
CREATE TABLE pbist_apimgmt.[configuration]
(
id INT IDENTITY(1, 1) NOT NULL,
configuration_group VARCHAR(150) NOT NULL,
configuration_subgro... |
<gh_stars>1-10
USE burgers_db;
INSERT INTO burgers (burger_name, devoured) VALUE ("hamburger", true), ("cheeseburger", true), ("crispy chicken", false); |
truncate table dbo.blocks
truncate table dbo.contracts
truncate table dbo.transactionlogs
truncate table dbo.transactionlogvmstacks
truncate table dbo.transactions
truncate table kovan.blocks
truncate table kovan.contracts
truncate table kovan.transactionlogs
truncate table kovan.transactionlogvmstacks
truncate table ... |
<filename>352/mini-projects/hw2/queries/task_1_1.sql
select
p.pub_type, count(p.pub_type) as total_pubs_of_type
from
Pub p
group by
p.pub_type
order by
total_pubs_of_type desc; |
-- 2021-09-23T12:06:34.603Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,541416,TO_TIMESTAMP('2021-09-23 15:06:34','YYYY-MM-DD HH2... |
-- MySQL database script to generate the worddb database
-- Assumes a local file called en.csv containing a comma seperated list which looks like:
-- 0,word,4
-- where the last column is the word length.
-- You will also need to create a user with access to this db, which you will add to the
-- dbconfig.json file used ... |
{% macro cast_as_string() %}
{{ return(adapter.dispatch('cast_as_string', 'salesforce_formula_udfs')()) }}
{% endmacro %}
{% macro default__cast_as_string() %}
create or replace function cast_as_string(field varchar)
returns varchar
as
$$
cast(field as varchar)
$$
;
{% endmacro %}
... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : gulu
Source Server Version : 50629
Source Host : 172.16.58.3:3306
Source Database : gulu
Target Server Type : MYSQL
Target Server Version : 50629
File Encoding : 65001
Date: 2017-01-18 08:56:02
*/
SET FOREIGN_KEY_CHECKS=0;... |
CREATE TABLE Users (
id CHAR(36) NOT NULL UNIQUE,
email CHAR(250) NOT NULL UNIQUE,
password CHAR(250) NOT NULL,
created_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
); |
ALTER TABLE `hotel`.`hospedes`
ADD COLUMN `sobrenome` VARCHAR(255) NULL DEFAULT NULL AFTER `rg`; |
<filename>inst/testCases/sql/indicationsTest.sql
TRUNCATE TABLE @cdm_database_schema.PERSON;
TRUNCATE TABLE @cdm_database_schema.DRUG_EXPOSURE;
TRUNCATE TABLE @cdm_database_schema.OBSERVATION_PERIOD;
TRUNCATE TABLE @cdm_database_schema.CONDITION_OCCURRENCE;
-- TEST: indicationsTest.json
INSERT INTO @cdm_database_sch... |
<gh_stars>1-10
USE linebot;
SHOW VARIABLES LIKE 'secure_file_priv';
LOAD DATA INFILE "output_utf8.csv"
INTO TABLE Answers_public
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
LOAD DATA INFILE "output_utf8.csv"
INTO TABLE Answers_public
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY ... |
select count(*) from nulls where float_11 <> 1.0
49
|
<gh_stars>100-1000
CREATE DATABASE /*!32312 IF NOT EXISTS*/`tsblog` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `tsblog`;
/*Table structure for table `tb_post` */
DROP TABLE IF EXISTS `tb_post`;
CREATE TABLE `tb_post` (
`Id` int(12) NOT NULL AUTO_INCREMENT,
`Title` varchar(255) DEFAULT '' COMMENT '标题',
`Conte... |
<filename>tests/queries/0_stateless/01042_h3_k_ring.sql
-- Tags: no-unbundled, no-fasttest
SELECT arraySort(h3kRing(581276613233082367, 1));
SELECT h3kRing(581276613233082367, 0);
SELECT h3kRing(581276613233082367, -1); -- { serverError 12 }
|
drop table if exists rig_xml;
create table rig_xml (
well_uid text, -- e.g. W-12
well_name text, -- e.g. 6507/7-A-42
rig_uid text, -- e.g. xr31
rig_name text, -- e.g. Deep Drill #5
rig_owner text, -- e.g. Deep Drilling Co.
rig_contact text, -- e.g. <NAME>
rig_email tex... |
--! Previous: sha1:12e2f1de62cac0715dbce2bc942d5d1d104004b4
--! Hash: sha1:f69ac42284fe2f65421128f7d4eb2ff2e0fb01ba
-- Enter migration here
COMMENT ON TABLE "public"."posts" IS E'@omit create';
COMMENT ON TABLE "public"."projects" IS '
@omit create,delete
SeaSketch Project type. This root type contains most of the fi... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 07, 2017 at 06:12 AM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 7.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
<gh_stars>0
# noinspection SqlNoDataSourceInspectionForFile
# DROP DATABASE IF EXISTS blog_db;
# CREATE DATABASE blog_db DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
# USE blog_db;
# --- !Ups
CREATE TABLE IF NOT EXISTS posts(
id int(11) NOT NULL auto_increment,
title varchar(50) NOT NULL UNIQUE,
body var... |
<reponame>VladimirAnaniev/state-exam-prep
-- Дадена е базата от данни Movies.
-- Таблицата Studio съдържа информация зафилмови студиа:
-- - name – име, първичен ключ;
-- - address – адрес.
-- Таблицата Movie съдържа информация за филми.
-- Колоните title и year заедноформират първичния ключ.
-- - title – ... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS Documents (
name TEXT,
scan_date INT,
content TEXT,
description TEXT,
file_ext TEXT,
file_orig_name TEXT
);
CREATE TABLE IF NOT EXISTS Appendicies (
parent_id INT NOT NULL,
content TEXT
);
CREATE TABLE IF NOT EXISTS Tags (
name TEXT NOT NULL
);
... |
INSERT INTO Client (Identification, ShortName, Name)
VALUES ('123.456','Roberto','<NAME>')
INSERT INTO Client (Identification, ShortName, Name)
VALUES ('16.456','Gustavo','<NAME>') |
CREATE VIEW [video].[vw_tv_episodes]
AS
SELECT tv.tv_episode_id, tv.series_id, tv.imdb_id, tv.mpaa_rating,
tv.season_number, tv.episode_number, tv.episode_name, tv.release_date, tv.plot, tv.runtime
FROM video.tv_episodes tv WITH (NOLOCK);
|
<filename>Atividades ate 26-07-2019/ExerciciosBancoDeDados/Query Creat Alunos.sql
CREATE TABLE [dbo].[Alunos]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1),
[Nome] VARCHAR(100) NOT NULL,
[Disciplina] INT NOT NULL
CONSTRAINT [FK_Alunos_Disciplinas]
FOREIGN KEY ([Disciplina])
REFERENCES [Disciplinas]([Id])
)... |
<reponame>LibrariesHacked/librarydata-db
create table plr_isbn (
id serial,
isbn character varying (13),
constraint pk_plrisbn_id primary key (id)
);
create unique index idx_plrisbn_id on plr_isbn (id);
cluster plr_isbn using idx_plrisbn_id; |
--
-- Table structure for table `credentials`
--
CREATE TABLE IF NOT EXISTS `credentials` (
`id` varchar(40) NOT NULL,
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT ... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 13, 2022 at 08:23 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 7.4.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50714
Source Host : localhost:3306
Source Database : project
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2018-02-09 16:40:41
*/
SET FOREIGN_KEY_CHECKS=0;
... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5ubuntu0.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 17, 2021 at 03:47 PM
-- Server version: 5.7.35-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... |
<reponame>FelipeVa/ERIIA_
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 17-09-2020 a las 05:18:39
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600054',@CutoffDate = N'2017-09-30',@EPS = N'0.4581',@EPSDeduct = N'0',@Revenue = N'13.17亿',@RevenueYoy = N'6.70',@RevenueQoq = N'30.26',@Profit = N'3.42亿',@ProfitYoy = N'4.97',@ProfiltQoq = N'10.71',@NAVPerUnit = N'5.6364',@ROE = N'8.18',@CashPerUnit = N'0.6347',@GrossProfitRate = ... |
<filename>utility/Database/sql/Temp.sql
INSERT INTO temp VALUES (10000,'Comedy');
INSERT INTO temp VALUES (10001,'Comedy');
INSERT INTO temp VALUES (10002,'Crime');
INSERT INTO temp VALUES (10003,'Thriller');
INSERT INTO temp VALUES (10004,'Drama');
INSERT INTO temp VALUES (10005,'Action');
INSERT INTO temp VALUES (100... |
INSERT INTO "groups"("id", "name", "subject_id", "status", "created_date", "updated_date", "is_deleted", "lecturer_id") VALUES (1, 'OOP Programming - Thay Tinh', 214352, 1, '2021-07-08 23:05:56.556881', '2021-07-08 23:05:56.564128', 0, 13);
INSERT INTO "groups"("id", "name", "subject_id", "status", "created_date", "upd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.