sql stringlengths 6 1.05M |
|---|
<reponame>leemonbd/music-crud-laravel
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 28, 2020 at 06:46 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
CREATE TABLE tb_atendimento(
id_atendimento SERIAL PRIMARY KEY,
data_atendimento timestamp,
descricao_atendimento VARCHAR(255),
nome VARCHAR(255),
solucao_apresentada VARCHAR(255),
situacao_atendimento VARCHAR(255),
id_produto int,
id_usuario int,
id_tipo_atendimento int,
CONSTRAINT fk_atendimento_produto FOR... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS CustomerTable (
customer_id serial PRIMARY KEY,
firstName varchar,
middleName varchar,
lastName varchar,
email varchar,
); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 29, 2021 at 11:28 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
USE M_Gufos
SELECT *
FROM Usuarios
SELECT *
FROM Eventos
SELECT *
FROM Categorias ORDER BY IdCategoria ASC
SELECT *
FROM Presencas
SELECT Eventos.*, Categorias.Nome
FROM Eventos
JOIN Categorias
ON Eventos.IdCategoria = Categorias.IdCategoria;
SELECT Presencas.*, Usuarios.*, Eventos.*, C... |
<gh_stars>1-10
drop table if exists DC_PRECONTRACT;
/*==============================================================*/
/* Table: DC_PRECONTRACT */
/*==============================================================*/
create table DC_PRECONTRACT
(
PRECONTRACT_NO varchar(12) not... |
alter table device
add column skip_fcnt_check boolean not null default false; |
<filename>chef-d'oeuvre/chef_d_oeuvre/BDD/MySQL/Dump/Join_all-tables.sql
/*
-- Query: SELECT Villes.Ville, Villes.Code_postal,Coordonnees_geo.Latitude,Coordonnees_geo.Longitude, Temps_voiture_pointe.Temps AS Temps_voiture_heure_de_pointe,Temps_voiture.Temps AS Temps_voiture_normal, Temps_velo.Temps AS Temps_velo, Temp... |
<gh_stars>10-100
-- WideWorldImportersDW Database Metadata Population
--
-- Creates the WWI_DW_Preparation Database
--
USE master;
GO
IF EXISTS(SELECT 1 FROM sys.databases WHERE name = N'WWI_DW_Preparation')
BEGIN
ALTER DATABASE WWI_DW_Preparation SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE WWI_DW... |
-- +goose Up
-- SQL in this section is executed when the migration is applied.
ALTER TABLE "items" ADD "created_at" datetime;
UPDATE "items" set created_at = CURRENT_TIMESTAMP;
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
ALTER TABLE "items" RENAME TO "items_backup";
CREATE TABL... |
<gh_stars>1-10
create table t_employee(
id int(12) not null auto_increment,
real_name varchar(60) not null ,
sex int(2) not null comment '1 - 男 0 - 女',
birthday date not null ,
mobile varchar(20) not null,
email varchar(20) not null,
POSITION varchar(20) no... |
SELECT movies.id, movies.name FROM movies JOIN prices ON movies.id_prices = prices.id AND prices.value < 2;
|
-- Verify seattleflu/schema:roles/incidence-modeler on pg
begin;
rollback;
|
<gh_stars>100-1000
CREATE DATABASE spec;
|
-- file:create_index.sql ln:760 expect:true
CREATE UNIQUE INDEX CONCURRENTLY concur_index3 ON concur_heap(f2)
|
<reponame>vagrantism/airbyte<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mssql/test_nested_streams/second_output/airbyte_ctes/test_normalization/nested_stream_with_co__lting_into_long_names_ab2.sql<gh_stars>1-10
USE [test_normalization];
execute('create view _a... |
<gh_stars>1-10
-- --------------------------------------------------------
-- Host: 10.2.25.93
-- Server version: 10.0.14-MariaDB - MariaDB Server
-- Server OS: Linux
-- HeidiSQL Version: 9.1.0.4867
-- -------------------------------------------------... |
UPDATE "share" SET latency_threshold = 0;
COMMIT;
QUIT;
|
CREATE
OR REPLACE VIEW unique_tpp_ods_codes_feb AS
SELECT DISTINCT ods_code
FROM
(SELECT col2 AS ods_Code,
col6 AS reporting_period,
"$path" AS s3key
FROM raw_mi
WHERE col1='HR'
AND REGEXP_LIKE("$path",'Stats([6-9]|10)_.{6}.dat$')
AND REGEXP_LIKE(col4, '^TP... |
<gh_stars>10-100
select akas, flow_log_id, traffic_type, tags_src, tags, title
from aws.aws_vpc_flow_log
where akas::text = '["{{ output.resource_aka.value }}"]'
|
<gh_stars>100-1000
DROP TABLE IF EXISTS erc721_token_ingestion_queue; |
<reponame>VirgilSecurity/virgil-messenger-qt
SELECT *
FROM contacts
WHERE userId IN (:userIds)
|
#exercice 1 création d'une procédure stockée sans paramètre
#Créez la procédure stockée Lst_fournis correspondant à la requête n°2 afficher le code des fournisseurs pour lesquels une commande a été passée.
#Exécutez la pour vérifier qu’elle fonctionne conformément à votre attente.
#Exécutez la commande SQL suivante pou... |
<gh_stars>0
insert into driver(name, age) values("Tom", 29);
insert into bus(driver_id, plate, `year`, brand, seat_number, occupied_seat_number) values
(2, "FGHIJ-34", 3, "Ford", 30, 0); |
SELECT c1.id, c1.description, COALESCE(json_agg(json_build_object('id', c2.id, 'description', c2.description)) FILTER (WHERE c2.id IS NOT NULL), '[]') as subcategories
FROM category c1 LEFT JOIN category c2 ON c1.id = c2.parent_id
WHERE c1.parent_id IS NULL
GROUP BY c1.id, c1.description
ORDER BY c1.description |
CREATE TABLE `puja_acl_privilege` (
`id_acl_privilege` int(11) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(128) NOT NULL,
`name` varchar(255) NOT NULL,
`created_at` DATETIME NULL COMMENT 'system',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'system',
PRIMA... |
ALTER SYSTEM SET max_connections = 200;
|
/*
*/
CREATE TABLE IF NOT EXISTS TEST (
TAB_TYPE INTEGER,
TAB_MAX_INDEX INTEGER DEFAULT 5
);
INSERT INTO TEST (TAB_TYPE) VALUES(NULL);
PRAGMA user_version = 1;
|
<gh_stars>0
/*
Version 2.0.2 Tenant migration script
*/
ALTER TABLE [dbo].[Setting] ALTER COLUMN [SettingName] [nvarchar](200) NOT NULL
GO
ALTER TABLE [dbo].[Site]
DROP COLUMN DefaultLayoutType
GO
ALTER TABLE [dbo].[Page]
DROP COLUMN LayoutType
GO
UPDATE [dbo].[Site] SET DefaultContainerType = 'Oqtane.Themes.... |
<gh_stars>0
CREATE TABLE players (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER,
game_id INTEGER,
hp REAL,
max_hp REAL,
heal REAL,
armor REAL,
attack REAL,
income INTEGER,
coins INTEGER,
energy REAL,
energy_increase REAL,
energy_acceleration REAL,
FOREIGN KEY (user_id)
REFERENCES users (id),
F... |
show tables;--
-- large DWH
-- 60M rows
--destination (final) table
CREATE TABLE "lineitems_tmp" (
"L_ORDERKEY" varchar(4000) NOT NULL DEFAULT NULL,
"L_PARTKEY" varchar(4000) NOT NULL DEFAULT NULL,
"L_SUPPKEY" varchar(4000) NOT NULL DEFAULT NULL,
"L_LINENUMBER" varchar(4000) NOT NU... |
<gh_stars>1-10
USE [Koski_SA]
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[sa].[temp_oppivelvollisuus_suoritettu]') AND type in (N'U'))
BEGIN
CREATE TABLE [sa].[temp_oppivelvollisuus_suoritettu](
[oppija_oid] [varchar](50) NULL,
[opiskeluoikeus_oid] [varchar](150) NULL,
[koulutusmodu... |
CREATE TABLE Orders(
orderID int NOT NULL AUTO_INCREMENT,
orderUserID int NOT NULL,
orderDetailID int NOT NULL,
status VARCHAR(50),
orderDate DATE NOT NULL,
shippedDate DATE,
payment VARCHAR(64) NOT NULL,
PRIMARY KEY (cartID),
CONSTRAINT FK_orderUserID FOREIGN KEY (orderUserID) REFERENCES Users(userID)
);
CR... |
<reponame>KuttKatrea/sublime-sqlquickrun
select 'string' FROM
|
<gh_stars>10-100
DROP VIEW IF EXISTS [ViewStarWarsFriends]
GO
DROP TABLE IF EXISTS [StarWarsAppearances]
GO
DROP TABLE IF EXISTS [StarWarsFriends]
GO
DROP TABLE IF EXISTS [StarWarsCharacters]
GO
DROP TABLE IF EXISTS [StarWarsCharacters]
GO
|
<gh_stars>0
CREATE TABLE seg.tbFnpr
(
fnpr_cod CHAR(20) NOT NULL,
prog_cod CHAR(20) NOT NULL,
fnpr_dsc CHAR(70) NOT NULL,
CONSTRAINT tbFnpr_PK PRIMARY KEY
(
fnpr_cod
),
CONSTRAINT tbFnpr_X_tbProg FOREIGN KEY
(
prog_cod
)
REFERENCES seg.tbProg
(
prog_cod
)
)
GO
|
CREATE TABLE customerthread (
id CHAVE NOT NULL,
id_shop CHAVE NOT NULL,
id_lang CHAVE NOT NULL,
id_contact CHAVE NOT NULL,
id_customer CHAVE,
id_order CHAVE,
id_product CHAVE,
status CHARACTER VARYING... |
<reponame>harshach/streamline-1
-- Copyright 2017 Hortonworks.
--
-- 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... |
-- Create measured channel width table
-- First, load measured channel widths from:
-- - stream sample sites
-- - PSCIS assessments
-- Then, for generating predicted channel width, load additional parameters for these locations from FWA/MAP
DROP TABLE IF EXISTS bcfishpass.channel_width_measured;
CREATE TABL... |
# patch 6
# --- !Ups
ALTER TABLE `alert_history`
MODIFY `alert_value` DECIMAL(10,0) DEFAULT 0;
# --- !Downs
ALTER TABLE `alert_history`
MODIFY `alert_value` DECIMAL(10,0) NOT NULL DEFAULT 0;
|
<gh_stars>1-10
DO
$do$
DECLARE
_version INT := 16;
BEGIN
IF EXISTS (SELECT version FROM db_version WHERE version < _version) THEN
ALTER TABLE features ADD COLUMN lightning_end_at TIMESTAMPTZ;
CREATE TABLE lightning_scoreboard (
team_id UUID PRIMARY KEY REFERENCES teams(id),
... |
-- @testpoint: opengauss关键字schema非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists schema;
create index schema on explain_test(id);
drop index schema;
--关键字带双引号-成功
drop index if exists "schema";
create index "sch... |
CREATE TABLE USERS(
username VARCHAR(30) PRIMARY KEY,
password <PASSWORD>
);
CREATE TABLE userEmail(
username varChar(30),
Email varchar(30) PRIMARY KEY
)
CREATE TABLE PROJECT(
ID INT PRIMARY KEY,
creator VARCHAR(30),
name VARCHAR(30),
createdOn VARCHAR(30) --Day/Month/Year/hour(24hr)/min/sec
);
CREA... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: db:3306
-- Generation Time: Dec 14, 2020 at 04:33 AM
-- Server version: 8.0.18
-- PHP Version: 7.2.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
create function getNthHighestSalary(N int) returns int
begin
set n = n-1;
return (
select
distinct Salary
from Employee
order by Salary desc
limit 1
offset n
);
end
; |
<filename>src/main/resources/db/migration/V15__subject.sql
CREATE TABLE subject
(
id SERIAL PRIMARY KEY,
position_x FLOAT NOT NULL,
position_y FLOAT NOT NULL,
scale FLOAT NOT NULL,
editable BOOLEAN NOT NULL,
rotation FL... |
SET QUOTED_IDENTIFIER ON
GO
UPDATE TblIntervention
SET PlanningDate = v.[Date]
FROM TblIntervention i
INNER JOIN TblPlanningEvent v ON v.InterventionId = i.Id
GO
SET QUOTED_IDENTIFIER OFF
GO
|
<reponame>jfeser/castor-opt
-- $ID$
-- TPC-H/TPC-R Important Stock Identification Query (Q11)
-- Functional Query Definition
-- Approved February 1998
select
ps_partkey,
sum(ps_supplycost * ps_availqty) as value
from
partsupp,
supplier,
nation
where
ps_suppkey = s_suppkey
and s_nationkey = n_nationkey
and n_name = ':... |
create database YELCARL
use YELCARL;
create table Cliente(
Id_cliente int primary key,
Primer_nombre varchar(15),
Segundo_nombre varchar(15),
Primer_apellido varchar(15),
Segundo_apellido varchar(15),
Cedula varchar(25)
)
create table Producto(
Id_producto int primary key,
Id_laboratorio int,
Codigo_producto int,
Nom... |
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 09 Des 2016 pada 14.08
-- Versi Server: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... |
CREATE TABLE `sp_academyconfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`level` int(3) DEFAULT NULL COMMENT 'level of academy',
`buildingToken` int(11) DEFAULT NULL COMMENT 'building token require for this level',
`bonusRate` int(3) DEFAULT '0' COMMENT 'value from 0 -> 100',
PRIMARY KEY (`id`)
) ENGINE=InnoDB... |
<filename>database.sql
-- Users table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(40) NOT NULL,
first_name VARCHAR(40) NOT NULL,
last_name VARCHAR(40) NOT NULL,
is_admin BOOLEAN DEFAULT false
);
-- Events table
CREATE TABLE events (
id SERIAL PRIMARY KEY,
date date NOT NULL
);
-- Roles table
C... |
<reponame>Bhavanshuvig/TimeTable-Generator
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: timetable
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... |
<reponame>DNL-inc/bit
-- upgrade --
CREATE TABLE IF NOT EXISTS "faculty" (
"id" SERIAL NOT NULL PRIMARY KEY,
"title" VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS "groups" (
"id" SERIAL NOT NULL PRIMARY KEY,
"title" VARCHAR(255) NOT NULL,
"course" INT NOT NULL,
"faculty_id" INT NOT NULL RE... |
INSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `headertype`, `headercode`, `accesstype`, `hide`) VALUES ('3', '0', 'Main Menu', '1', 'customcode', '<div class=\'navMenuTitle\'>Navigation</div>', '0', '0');
INSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `head... |
<reponame>huynhtrankhanh/parlance
CREATE INDEX IF NOT EXISTS index2 ON messages (inbox_id) |
-- cast.test
--
-- execsql {SELECT CAST(x'39323233333732303336383534373734383030' AS real)}
SELECT CAST(x'39323233333732303336383534373734383030' AS real) |
---- drop ----
DROP TABLE IF EXISTS `test_tqable`;
---- create ----
create table IF not exists `test_table`
(
`id` INT(20) AUTO_INCREMENT,
`name` VARCHAR(20) NOT NULL,
`created_at` TIMESTAMP NOT NULL DEFAULT NOW(),
`updated_at` TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE now(),
PRIMARY... |
DROP TABLE EPS_PROPOSAL_STATUS ;
CREATE TABLE EPS_PROPOSAL_STATUS (
STATUS_CODE NUMBER (3) NOT NULL,
DESCRIPTION VARCHAR2 (200) NOT NULL,
UPDATE_TIMESTAMP DATE NOT NULL,
UPDATE_USER VARCHAR2 (8) NOT NULL,
CONSTRAINT PK_EPS_PROPOSAL_STATUS_KRA
PRIMARY KEY ( STATUS_CODE... |
CREATE TABLE [dbo].[TStrictOrientedElementWithLength]
(
--From MergedXSDs XSD
--From 'genericRailML' Namespace
[TStrictOrientedElementWithLengthId] SMALLINT NOT NULL,
[DirValue] TINYINT NOT NULL,
[DirValueSpecified] BIT NOT NULL,
CONSTRAINT [PK_TStrictOrientedElementWithLengthId] PRIMARY KEY CLUSTER... |
<filename>flyway/sql/V0.0.2__create_project_file.sql
USE rms;
-- table: project
DROP TABLE IF EXISTS project;
CREATE TABLE IF NOT EXISTS project (
id BIGINT(32) NOT NULL AUTO_INCREMENT,
name VARCHAR(32) NOT NULL,
aliases VARCHAR(256) DEFAULT NULL
COMMENT 'separated by comma',
is_... |
-- workflow_actions
UPDATE workflow_actions
INNER JOIN z_2902_workflow_actions
ON z_2902_workflow_actions.id = workflow_actions.id
SET workflow_actions.event_key = z_2902_workflow_actions.event_key;
DROP TABLE z_2902_workflow_actions;
-- db_patches
DELETE FROM `db_patches` WHERE `issue`= 'POCOR-2902'; |
ALTER TABLE KV_RECORD ADD COLUMN BUSINESS_KEY VARCHAR(100);
|
<gh_stars>10-100
SELECT endpoint.id AS id,
addr_id,
plugin_name,
config,
endpoint.active AS active,
description
FROM endpoint
JOIN addr ON addr.id=endpoint.addr_id
WHERE addr.id=:addr_id
OR addr.a=:addr
ORDER BY id
|
ALTER TABLE batches ADD COLUMN "key" VARCHAR(1024);
UPDATE batches SET "key" = '';
ALTER TABLE messages ADD COLUMN "key" VARCHAR(1024);
UPDATE messages SET "key" = '';
ALTER TABLE tokenpool ADD COLUMN "key" VARCHAR(1024);
UPDATE tokenpool SET "key" = '';
|
<filename>hplsql/src/test/queries/local/substring.sql
SUBSTRING('FAILED Correct', 8);
SUBSTRING('FAILED Correct FAILED', 8, 7);
SUBSTRING('FAILED Correct' FROM 8);
SUBSTRING('FAILED Correct FAILED' FROM 8 FOR 7);
SUBSTRING('', 8);
SUBSTRING(NULL, 8);
|
<filename>src/test/regress/sql/wrkloadadmin.sql<gh_stars>10-100
-- Test Workload Administration and Resource queuing
-- create resource queue
CREATE RESOURCE QUEUE adhoc11 ACTIVE THRESHOLD 1;
-- select from pg_resqueue table
select * from pg_resqueue where rsqname='adhoc11';
--create role and assign role to ... |
<filename>penyusutan_2019_r2/penyusutan_modul3_jij_2019_r2.sql
DROP view if exists view_penyusutan_jij_2019_r2_a3 CASCADE;
create view view_penyusutan_jij_2019_r2_a3 as
select register,
nama_skpd,
id_skpd,
nama_lokasi_bidang,
id_lokasi_bidang,
nama_kabupaten,
id_kabupaten,
nama_provinsi,
id_provinsi,
id_mutasi_berkur... |
<gh_stars>0
USE book_library;
UPDATE books
SET title = REPLACE(title, "The", "***")
WHERE SUBSTRING(title, 1, 3) = "The";
SELECT title FROM books
WHERE SUBSTRING(title, 1, 3) = "***"; |
SELECT G_OWN AS G_Owner
, G_VOL AS G_SubscriberVolume
, CNT AS Count
, CDTCreate_Date
FROM tbl_subvol
WHERE G_OWN = ?pNode
ORDER BY CDT
LIMIT ?pStart, 1 |
<reponame>ontio-sourcing/ont-sourcing<gh_stars>0
# 注意!表名称可能不一样,运行之前,要对应修改一下!
ALTER TABLE `tbl_contract_201904221200` ADD `revoke_tx` VARCHAR(255) NULL AFTER `status`; |
<reponame>griffithlab/civic-v2
SELECT variants.id,
variants.name,
variants.civic_actionability_score AS evidence_score,
genes.id as gene_id,
genes.name as gene_name,
COUNT(DISTINCT(evidence_items.id)) as evidence_item_count,
json_agg(distinct jsonb_build_object('name', diseases.name, 'id', diseases.id)) FI... |
<reponame>BeginTry/SQL-Server-Development<filename>Column-Level Encryption Demo/01c Drop Encryption By Service Master Key.sql<gh_stars>0
USE DaveTest;
GO
--Original Server
--As before, we can open the symmetric without a password.
OPEN SYMMETRIC KEY CustomerSmtpKey
DECRYPTION BY CERTIFICATE CustomerData;
CLOSE SYM... |
<reponame>tejutejaswini156/CSC
/*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.5.5-10.1.16-MariaDB : Database - cms
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */... |
DROP TABLE IF EXISTS sample; |
-- Create table.
CREATE TABLE trgr (
id INTEGER PRIMARY KEY,
n INTEGER
);
-- Create trigger.
CREATE OR REPLACE FUNCTION trgr_autodelete() RETURNS trigger AS $$
BEGIN
IF NEW.n = 0 THEN
DELETE from trgr WHERE id = NEW.id;
END IF;
RETURN NULL;
END
$$ LANGUAGE 'plpgsql';
CREATE TRIGGER trgr_autodelete AFTER ... |
<reponame>ariefputranto/tost<filename>form/mysql query/tableMHS.sql
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 10, 2016 at 07:53 PM
-- Server version: 5.5.47-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_... |
<gh_stars>0
/*
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role` varchar(45) DEFAULT NULL,
`name` varchar(45) DEFAULT NULL,
`courses` mediumtext,
`chat_id` int(11) DEFAULT NULL,
`mobile` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `chat_id_UNIQUE` (`chat_id`),
UNIQUE KEY ... |
<reponame>cscl-git/digit-bpa
Insert into eg_action(id,name,url,parentmodule,ordernumber,displayname,enabled,contextroot,application,createdby, createddate, lastmodifiedby, lastmodifieddate) values
(nextval('SEQ_EG_ACTION'),'update-checklist','/checklist/update',(select id from eg_module where name='Checklist Master' )... |
CREATE DATABASE IF NOT EXISTS dev;
CREATE USER IF NOT EXISTS dev;
SET PASSWORD FOR dev = '<PASSWORD>';
GRANT ALL PRIVILEGES ON dev.* TO dev;
FLUSH PRIVILEGES;
|
/* main foodgroups IDs */
insert into foodgroups (id, parent_group_id) select distinct group_id, group_id from foods order by group_id;
/* subgroup IDs and their parent group_ids */
insert into foodgroups (id, parent_group_id) select distinct sub_group_id, group_id from foods where sub_group_id > 28 order by sub_group_... |
<reponame>gaurangkumar/codework
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 06, 2020 at 07:23 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
INSERT INTO [dbo].[Rooms]
VALUES (N'8239f005-c2e9-4bc1-acd8-5b3fcbbf3896', N'0ff4e570-e3c9-4312-a7cd-3cfe6a162831', N'ул. Богдана, 22', 50, 0, 0.3, 1.0, 0.8, 1.0, 1.0),
(N'833ebf5c-9ede-434c-a551-923c73ba3a26', N'7f43ff20-d850-457d-b92a-53c8e794700a', N'ул. Богдана, 20', 20, 0, 0.3, 1.0, 0.8, 1.0, 1.0),
(N'9ccab20e-6e... |
-- file:domain.sql ln:471 expect:true
insert into ddtest2 values('(-1,3]')
|
<reponame>mossnisse/Virtuella-Herbariet<gh_stars>0
CREATE DATABASE IF NOT EXISTS `samhall` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `samhall`;
-- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
--
-- Host: 192.168.3.11 Database: samhall
-- ------------------------------------------------------
-- Server ... |
ALTER TABLE db_version CHANGE COLUMN required_9767_01_mangos_mangos_string required_9767_02_mangos_command bit;
DELETE FROM command WHERE name IN('character delete', 'character deleted list', 'character deleted restore', 'character deleted delete', 'character deleted old', 'character erase');
INSERT INTO command (name... |
<filename>SQL/BasicSelect/station12.sql
-- MySQL
-- HackerRank SQL BasicSelect 17
-- https://www.hackerrank.com/challenges/weather-observation-station-12/problem
-- Author: Hasol
select distinct CITY from STATION where CITY rlike '^[^AEIOU].+[^aeiou]$';
|
-----------------------------------------
--DDL for table EMPLOYEE_LOOKUP
-----------------------------------------
ALTER TABLE
HHS_HR.EMPLOYEE_LOOKUP
ADD
(
WGI_DUE_DATE DATE,
SCD DATE
); |
CREATE TABLE "overall_reports" ("model_name" varchar NOT NULL,"model_version" integer NOT NULL,"batch_name" varchar NOT NULL,"suspicious_percent" real NOT NULL, "failed_percent" real NOT_NULL); |
alter table product_type
drop column external_table;
alter table product_type
add if not exists alias text null;
|
{{config(enabled = target.type == 'bigquery')}}
{% if var("projects_warehouse_delivery_sources") %}
{% if 'jira_projects' in var("projects_warehouse_delivery_sources") %}
with source as (
{{ filter_stitch_relation(relation=var('stg_jira_projects_stitch_issues_table'),unique_column='key') }}
),
renamed as (
select c... |
<reponame>AxelMarquez/Ed-Fi-ODS
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE TABLE track... |
UPDATE Map_GreatPersonClasses SET MaxWorldInstances = 2; |
<reponame>mersinlioglue/muhcutransport<filename>sql/2_optionaler_fahrer.sql
ALTER TABLE `reservation`
ADD COLUMN `driver_id` INT NULL DEFAULT NULL AFTER `thermo`,
ADD CONSTRAINT `FK_reservation_employee` FOREIGN KEY (`driver_id`) REFERENCES `employee` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION;
|
<filename>sql/_27_banana_qa/issue_5765_timezone_support/_00_dev_cases/_02_operator/_19_day_of_year_with_local_tz/cases/dayofyear_003.sql
--pass different formats of timestampltz/datetimeltz arguments
--1. pass different formats of timestampltz arguments
--select dayofyear(timestampltz'13:14:55 10/08');
select if(dayof... |
<filename>database/seeders/sampleData/vmusic_artists.sql
INSERT INTO `artists` VALUES ('1st_place','1st PLACE','ふぁーすとぷれいす','Lia、じん、しづ、石風呂などのアーティストマネジメントやVOCALOID?3対応の歌声ライブラリ [IA -ARIA ON THE PLANETES-] の企画・開発、全てのクリエイターの創作活動支援を行うプロジェクト [IA PROJECT] を運営をする1st PLACE株式会社。',NULL,NULL,'UCu33JdVED-0vqaNyw_bCTKg','2012-11-12',... |
<reponame>DaoCasino/platform-back
DROP INDEX sessions_last_wins_idx;
DROP INDEX sessions_last_lost_idx;
DROP INDEX sessions_last_all_idx |
<gh_stars>0
SELECT username FROM v$session
WHERE username IS NOT NULL
ORDER BY username ASC;
select osuser, count(*) as active_conn_count
from v$session
group by osuser
order by active_conn_count desc;
|
-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
--
-- Host: localhost Database: latinvestco
-- ------------------------------------------------------
-- Server version 5.7.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE DATABASE AkkaNetResults
GO
CREATE DATABASE AkkaPersistence
GO
USE [AkkaNetResults]
GO
CREATE TABLE [dbo].[HourlyConsumption](
[DeviceId] [uniqueidentifier] NOT NULL,
[Timestamp] [datetime] NOT NULL,
[Consumption] [numeric](18, 4) NOT NULL,
[Unit] [nvarcha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.