sql stringlengths 6 1.05M |
|---|
<reponame>varunmaggo/AngularPOC
CREATE TABLE [dbo].[TimeSheetDetails] (
[TimeSheetID] INT IDENTITY (1, 1) NOT NULL,
[DaysofWeek] VARCHAR (50) NULL,
[Hours] INT NULL,
[Period] DATE NULL,
[ProjectID] INT NULL,
... |
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 3, 'Пр. процессы', 'ProdProcList', 'Производство', 0);
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 3, 'Пр. этапы', 'ProdStageList', 'Производство', 0);
INSERT INTO... |
<filename>Patches/Pre_Alpha_3/Raw_SQL/BALANCE_mk1_bonus_v2.sql
USE perpetuumsa
GO
DECLARE @definitionID int;
DECLARE @extensionID int;
DECLARE @aggfieldID int;
DECLARE @chassisbonusID int;
PRINT N'Locust-chassis';
SET @extensionID = (SELECT TOP 1 extensionid from dbo.extensions WHERE extensionname = 'ext_lightarmore... |
<filename>content.sql
-- BB Installation SQL script
CREATE TABLE posts (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
topic_id INTEGER NOT NULL DEFAULT 0,
parent_id INTEGER NOT NULL DEFAULT 0,
title TEXT NOT NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT NULL,
r... |
<reponame>NACHC-CAD/fhir-to-omop
/*sql server OMOP CDM Indices
There are no unique indices created because it is assumed that the primary key constraints have been run prior to
implementing indices.
*/
/************************
Standardized clinical data
************************/
CREATE CLUSTERED INDEX idx_pe... |
<filename>mysql/data-design.sql<gh_stars>0
DROP TABLE IF EXISTS `wishlist`;
DROP TABLE IF EXISTS album;
DROP TABLE IF EXISTS profile;
CREATE TABLE profile (
profileId BINARY(16) NOT NULL,
profileActivationToken CHAR(32),
profileEmail VARCHAR(128) NOT NULL,
profileHash CHAR(97) NOT NULL
);
CREATE TABLE album(
a... |
<reponame>elementary-data/dbt-data-reliability
{% macro get_configured_schemas_from_graph() %}
{% set configured_schemas = [] %}
{% if execute %}
{% for test_node in graph.nodes.values() | selectattr('resource_type', '==', 'test') %}
{% set test_metadata = test_node.get('test_metadata') %}
... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th3 14, 2017 lúc 09:18 SA
-- Phiên bản máy phục vụ: 10.1.21-MariaDB
-- Phiên bản PHP: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
<reponame>sir-nutty/myChaldea-DB
CREATE DEFINER=`admin`@`192.168.1.2` FUNCTION `getImagePath`(imageType VARCHAR(100)) RETURNS varchar(100) CHARSET utf8mb4
BEGIN
DECLARE imagePath VARCHAR(200);
SET imagePath = CONCAT('../images/',imageType,'/');
RETURN imagePath;
END |
CREATE DATABASE rugby_api;
USE rugby_api;
create table plaquage_ok (
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
sum_plaquage_ok int
);
create table plaquage_ko (
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
sum_plaquage_ko int
);
create table melee_ok (
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th1 08, 2022 lúc 05:21 PM
-- Phiên bản máy phục vụ: 10.4.21-MariaDB
-- Phiên bản PHP: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
UPDATE executions SET end_time = ?, next_schedule_time = ?, status = ?
WHERE job_name = ? AND partition = ? |
/*
SQLyog Community v13.1.2 (64 bit)
MySQL - 10.1.30-MariaDB : Database - jumpinglion
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHE... |
<gh_stars>1-10
-- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2020-06-10 12:44:44.473
-- tables
-- Table: Homework
CREATE TABLE Homework (
Homework_ID int NOT NULL AUTO_INCREMENT,
Teacher_Subject_Teacher_Subject_ID int NOT NULL,
Homework_Title varchar(100) NOT NULL,
... |
<filename>encurtador.sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 19-Jul-2020 às 01:06
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00... |
CREATE TABLE `despesas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`descricao` varchar(100) NOT NULL,
`valor` int(11) NOT NULL,
`mes` char(8) NOT NULL,
`created` DATETIME DEFAULT NULL,
`modified` DATETIME DEFAULT NULL,
`receita_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
... |
-- Verify scribly:existingdb on pg
BEGIN;
-- XXX Add verifications here.
ROLLBACK;
|
<reponame>s-oravec/eta<filename>module/api/uninstall.sql<gh_stars>1-10
prompt .. Dropping package ETA
drop package eta;
|
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"userName" VARCHAR(255) NOT NULL,
"userAddress" TEXT NOT NULL,
"userPhoneNumber" INTEGER NOT NULL,
"userEmail" TEXT NOT NULL,
"userPa... |
USE [ANTERO]
GO
ALTER TABLE [dw].[f_virta_otp_erikoistumiskoulutukset] DROP CONSTRAINT [DF_f_virta_otp_erikoistumiskoulutukset_username]
GO
ALTER TABLE [dw].[f_virta_otp_erikoistumiskoulutukset] DROP CONSTRAINT [DF_f_virta_otp_erikoistumiskoulutukset_loadtime]
GO
/****** Object: Table [dw].[f_virta_otp_erikoistumis... |
-- file:groupingsets.sql ln:313 expect:true
select unhashable_col, unsortable_col,
grouping(unhashable_col, unsortable_col),
count(*), sum(v)
from gstest4 group by grouping sets ((v,unhashable_col),(v,unsortable_col))
order by 3,5
|
# --- !Ups
ALTER TABLE login ADD COLUMN confirmed boolean DEFAULT false;
# --- !Downs
ALTER TABLE login DROP COLUMN confirmed;
|
<reponame>yregaieg/taskana
-- this script updates the tables TASKANA_SCHEMA_VERSION and HISTORY_EVENTS.
SET search_path %schemaName%;
INSERT INTO TASKANA_SCHEMA_VERSION (VERSION, CREATED) VALUES ('3.0.0', CURRENT_TIMESTAMP);
ALTER TABLE HISTORY_EVENTS DROP COLUMN COMMENT, DROP COLUMN OLD_DATA, DROP COLUMN NEW_DATA, ... |
select
customer_id,
count(*)
from {{ ref('stg_customers') }}
{{ dbt_utils.group_by(1) }}
|
<reponame>sivarki/hjarnuc<filename>data/mtrops_v2.sql<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 50640
Source Host : 127.0.0.1:3306
Source Schema : saltops_v2
Target Server Type : MySQL
Target Server ... |
-- 题目要求: https://leetcode-cn.com/problems/combine-two-tables/submissions/
select FirstName, LastName, City, State from Person p left join Address a on p.PersonId = a.PersonId where p.PersonId; |
<filename>datasets/idc/pipelines/_images/generate_bq_views/queries/current/dicom_pivot_v7.sql
select * from `PROJECT.idc_CURRENT_VERSION.dicom_pivot_v7`
|
<filename>course_work/is_sec_main.sql
#
# GeekUniversity. Факультет Искусственного интеллекта. 676 группа.
# <NAME>
#
# Проект по курсу "Основы реляционных баз данных. MySQL"
#
# 2021 г.
# #################################################################
#
# Описание базы данных
#
# Учет проектной деятельности предприя... |
<reponame>motech-implementations/mots<filename>src/main/resources/db/changelog/06_automated_report_settings.mysql.sql
--liquibase formatted sql
--changeset kdondziak:1605000841282-6
CREATE TABLE automated_report_settings (id VARCHAR(255) NOT NULL, created_date datetime NULL, updated_date datetime NULL, emails LONGTEXT... |
<gh_stars>10-100
create table tab_del_col
(
id number(15) not null,
col_default number(15),
add_orcas number(15) not null,
col_add varchar2(1)
);
|
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
WHERE table_schema=current_schema
AND table_name = 'smart_meter'
AND column_name='mbus_primary_address') THEN
ALTER TABLE ONLY "smart_meter" ADD COLUMN "mbus_primary_address" smallint;
END IF;
END;
$$ |
/*
Library: Cervical Cancer Screening for Individuals Exposed to DES In Utero
Author: CMS Alliance to Modernize Healthcare, operated by THE MITRE Corporation.
(C) 2021 The MITRE Corporation. All Rights Reserved.
Approved for Public Release: 21-1556.
Distribution Unlimited.
Unless otherwise noted, this... |
CREATE TABLE domain_restrictions (
domain_id INTEGER NOT NULL PRIMARY KEY REFERENCES domains(id),
restriction_level INTEGER NOT NULL DEFAULT 0
);
|
autocommit off;
create class foo ( a int);
insert into foo values( 1 );
select a1 from foo, table(a) as t1(a1);
rollback;
|
<filename>sql/_27_banana_qa/issue_13412_partition_indexes/cases/_02_primary_unique_key.sql
drop table if exists t;
create table t(a char(200) primary key,b varchar,c smallint,d int,e bigint,f date,g time,h timestamp,i datetime) partition by range(a)
(
partition p0 values less than ('dddd'),
partition p1 values less tha... |
<filename>src/test/regress/sql/hw_es_multi_column_stats_1.sql
--==========================================================
--==========================================================
\set ECHO all
set current_schema = hw_es_multi_column_stats;
set default_statistics_target=-2;
--======================================... |
<filename>src/test/resources/pgdiff_test_files/drop_function_similar_diff.sql<gh_stars>0
DROP FUNCTION IF EXISTS "public".multiply_numbers(smallint, smallint);
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 14, 2019 at 08:35 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
BEGIN;
-- Table: users
CREATE TABLE users
(
user_id uuid NOT NULL DEFAULT uuid_generate_v4(),
mobile character varying(13) NOT NULL,
firstname character varying,
surname character varying,
email_address character varying,
email_notifications boolean NOT NULL,
pushover_notifications boolean NOT NULL,
pu... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-02-2022 a las 17:15:03
-- Versión del servidor: 10.4.21-MariaDB
-- Versión de PHP: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>sql/structure/table/tag.sql<gh_stars>0
CREATE TABLE tag (
tag_id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
tag_name VARCHAR(64) NOT NULL,
PRIMARY KEY (tag_id),
UNIQUE INDEX tag_name (tag_name)
);
|
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th6 22, 2020 lúc 08:42 PM
-- Phiên bản máy phục vụ: 10.4.11-MariaDB
-- Phiên bản PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
CREATE TABLE PERSISTENT_LOGINS (
USERNAME VARCHAR(64) NOT NULL,
SERIES VARCHAR(64) NOT NULL PRIMARY KEY,
TOKEN VARCHAR(64) NOT NULL,
LAST_USED TIMESTAMP NOT NULL
); |
USE Gleif
GO
/*
Input filesizes
Top100 = 0,3Mb
Top1000 = 2Mb
Top10000 = 22Mb
https://docs.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-2017
*/
-- 1a.
-- Bulk Insert Xml-Lines into table
DROP TABLE IF EXISTS GleifLeiRecordXml10000;
CREATE TABLE GleifLeiRecordXml10000(
[LeiRe... |
<reponame>wireapp/poll-bot<gh_stars>1-10
alter table polls
add column time_stamp timestamp not null default now();
|
INSERT INTO public.customer VALUES (146131, 'Customer#000146131', 'zHPE,lnsd0D5Jjaft', 22, '32-747-429-9791', 2018.17, 'FURNITURE ', ' ironic deposits; quickly final asymptotes run. bravely ir');
INSERT INTO public.customer VALUES (105142, 'Customer#000105142', 'MCxTNFmf5qwu33msfY5', 16, '26-638-218-2368', 1902.64, 'BU... |
alter table "public"."demux_state" drop column "block_number" cascade;
|
--1. List the following details of each employee: employee number, last name, first name, gender, and salary.
select Employees.emp_no,
Employees.last_name,
Employees.first_name,
Employees.gender,
Salaries.salary
from Employees
inner join Salaries on Employees.emp_no = Salaries.emp_no;
--2. List employee... |
<filename>Code/PGPerfStatsSnapper/SQLs/fks_with_no_index.sql
-- based on https://github.com/pgexperts/pgx_scripts/blob/master/indexes/fk_no_index.sql
select * from fks_with_no_index order by 1,2; |
DROP TABLE IF EXISTS transaction CASCADE;
CREATE TABLE transaction (
block blockno NOT NULL REFERENCES block ON DELETE CASCADE,
index int NOT NULL CHECK (index >= 0),
id bigserial NOT NULL PRIMARY KEY,
hash hash NOT NULL UNIQUE,
near_hash hash NOT N... |
/*
https://www.hackerrank.com/challenges/revising-the-select-query/problem
QUERY ALL COLUMNS FOR ALL American cities IN CITY WITH populations larger THAN 100000. The CountryCode FOR America IS USA.
Input FORMAT
The CITY TABLE IS described AS FOLLOWS :CITY.jpg
Easy
Submitted 198842 times
Max Score 10
Need HELP ?
V... |
-- Test how extension synchronizes offsets with Kafka
-- This test REQUIRES a running Kafka instance. See 'kafka_test' directory for
-- instructions on how to setup one
-- start_matchignore
-- m/^NOTICE: Kafka-ADB: Offset for partition [0-9]* is not known, and is set to default value [0-9]*$/
-- end_matchignore
-- s... |
<reponame>JowXavier/Blog
/*
Navicat MySQL Data Transfer
Source Server : Localhost
Source Server Version : 50508
Source Host : localhost:3306
Source Database : blog
Target Server Type : MYSQL
Target Server Version : 50508
File Encoding : 65001
Date: 2014-05-28 09:20:43
... |
-------------------------------------------------------------------------------
-- <copyright company="Sherlock">
-- Copyright 2013 Sherlock. Licensed under the Apache License, Version 2.0.
-- </copyright>
-------------------------------------------------------------------------------
CREATE PROCEDURE [Test... |
drop table user if exists;
CREATE table user
(
id int not null,
user_name varchar(100) not null
); |
--------------------------------------------------------------------------
-- expansion setting test
--------------------------------------------------------------------------
.set expansion
.set expansion asdf
.run ../common/sqlite_setup.sql
.open sqlite::memory:
.script
var var1 = 'abc';
var var2 = 'def';
.end scri... |
<reponame>environet/environet
INSERT INTO "public"."permissions"("name") VALUES
('admin.hydro.riverbanks.read'),
('admin.hydro.riverbanks.create'),
('admin.hydro.riverbanks.update'),
('admin.hydro.riverbanks.delete');
|
--+ holdcas on;
autocommit off;
create table dual
(
dummy varchar(1)
);
insert into dual values ('X');
select to_char(1234) from dual;
select to_char(+1234) from dual;
select to_char(-1234) from dual;
select to_char(1234e+02) from dual;
select to_char(+1234e+02) from dual;
select to_char(-1234e+02) ... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/SQL/DML/full_join/Opengauss_Function_DML_Full_Join_Case0017.sql
-- @testpoint: join...on语句中的条件中含有数学表达式,查询成功
-- @modify at: 2020-11-13
--建表
drop table if exists all_datatype_table;
create table all_datatype_table(id int not null,c_intger integer,c_char char(... |
-- =====================================================
-- Author: <NAME>
-- Create date: 11/1/19
-- Description: Identify 5 queries that require
-- optimization. Provide SQL, query plan
-- and query execution time both before and
-- and after the optimization.
-- ==========... |
<filename>database/barcode (1).sql
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 14, 2021 at 07:17 PM
-- 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";
/... |
<reponame>theoners/C-DB---September-2019<gh_stars>0
USE [Service]
INSERT INTO Employees([FirstName],[LastName],[Birthdate] ,[DepartmentId]) VALUES
('Marlo','O''Malley','1958-9-21',1),
('Niki','Stanaghan','1969-11-26',4),
('Ayrton','Senna','1960-03-21',9),
('Ronnie','Peterson','1944-02-14',9),
('Giovanna','Amati','1959-... |
SELECT t_id, rechtsstatus, rechtskraftdatum, bemerkungen, bemerkungen_lang, kantonalerstatus, kantonalerstatus_lang
FROM afu_gewaesserschutz.gwszonen_status;
|
<filename>framework/sql/intersection_table.sql
CREATE TABLE `__database_name__`.`__table_name__`(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`sortable_id` INT(11),
`__model1_name___id` INT(11) NOT NULL,
`__model2_name___id` INT(11) NOT NULL,
`name` VARCHAR(50),
`seo_name` VARCHAR(50),
`created_date` TIMESTAMP ... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Gegenereerd op: 07 aug 2019 om 18:35
-- Serverversie: 10.1.30-MariaDB
-- PHP-versie: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<reponame>nikhilbhatewara/Leetcode
# Write your MySQL query statement below
select extra as report_reason,count(distinct post_id) as report_count
from actions
where extra is not null and action_date = '2019-07-04' and action = 'report'
group by extra
|
<filename>src/testing/Azos.Tests.Integration/CRUD/Queries/Types.Load.ora.sql
#pragma
modify=TBL_TYPES
select * from TBL_TYPES
|
begin
dbms_output.put_line('Happy New Year 1396');
end;
/
|
<reponame>isystk/kotlin-springboot-boilerplate
-- 自動生成のため原則修正禁止!!
SELECT
/*%expand*/*
FROM
m_mail_template
WHERE
/*%if criteria.mailTemplateIdEq != null */
and MAIL_TEMPLATE_ID = /* criteria.mailTemplateIdEq */1
/*%end*/
/*%if criteria.mailTemplateIdNe != null */
and MAIL_TEMPLATE_ID != /* criteria.mailTemplat... |
<reponame>z3z1ma/dbt-re-data
{{ re_data_last_base_metrics_part() }} |
<reponame>Ambal/mangos<gh_stars>1-10
ALTER TABLE db_version CHANGE COLUMN required_7884_02_mangos_playercreateinfo_action required_7886_01_mangos_petcreateinfo_spell bit;
DROP TABLE IF EXISTS `petcreateinfo_spell`;
|
<gh_stars>0
--- the update script below was added between d7 and d8 half a day after the change.
--- In case, one missed the upgrade, we add it to the current update again.
create or replace function content_folder__del (integer, boolean)
returns integer as '
declare
delete__folder_id alias for $1;
... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2016 at 05:01 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
#standardSQL
# Payment request api usage on ecommerce pages
SELECT
client,
COUNT(0) AS total_ecommerce,
COUNTIF(uses_payment_requst) AS total_using_payment_request,
COUNTIF(uses_payment_requst) / COUNT(0) AS pct_using_payment_request
FROM
(
SELECT
_TABLE_SUFFIX AS client,
url
FROM
`... |
CREATE TABLE public.cities (
c1 integer,
c2 text,
c3 bigint
)
PARTITION BY LIST ("left"(lower(c2), 1));
CREATE TABLE public.cities_ab PARTITION OF public.cities
FOR VALUES IN ('a', 'b');
|
SELECT fn_db_delete_config_value_all_versions('ReduceDeviceFromStorageDomain');
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th2 15, 2019 lúc 11:02 AM
-- Phiên bản máy phục vụ: 10.1.28-MariaDB
-- Phiên bản PHP: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2018 at 09:20 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
CREATE TABLE `users` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`nick_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` text COLLATE utf8mb4_unicode_ci NOT NULL,
`phone_number` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
`emai... |
use cadastro;
insert into curso values
('1', 'HTML5', 'Curso de HTML5', '40', '37', '2014');
update curso
set nome='HTML5CSS'
where idcurso='1';
delete from curso
where idcurso='1';
truncate curso;
|
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603600',@CutoffDate = N'2017-09-30',@EPS = N'0.35',@EPSDeduct = N'0',@Revenue = N'13.04亿',@RevenueYoy = N'31.10',@RevenueQoq = N'10.74',@Profit = N'8961.22万',@ProfitYoy = N'5.13',@ProfiltQoq = N'-41.34',@NAVPerUnit = N'2.6904',@ROE = N'14.13',@CashPerUnit = N'0.1922',@GrossProfitRat... |
Create portolio item for AB testing. sql etc in Excersises of onenote |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 01, 2020 at 10:23 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SET TIME ZONE 'UTC';
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
name VARCHAR(156) NOT NULL,
birthDay DATE NOT NULL,
phoneNumber VARCHAR(20),
email VARCHAR(256) NOT NULL,
creationDate TIMESTAMP NOT NULL
);
CREATE TABLE IF NOT EXISTS publications (
id SERIAL PRIMARY KEY,
creatorUser INT NOT NULL,... |
-- CREATE TABLE "proyectos_esquemas" ---------------------------
CREATE TABLE `proyectos_esquemas` (
`id_proyectos_esquemas` Int( 11 ) NOT NULL,
`id_esquema` Int( 11 ) NOT NULL,
`id_proyecto` Int( 11 ) NOT NULL,
CONSTRAINT `unique_id_proyectos_esquemas` UNIQUE( `id_proyectos_esquemas` ) )
ENGINE = InnoDB;
-- -----... |
<reponame>magazinexperts/maghub-datawarehouse-sql<filename>contact_export_for_email_mailing_list.sql
SELECT
coalesce((lower(contacts.email)),'') as 'Email Address',
coalesce(contacts.firstname,'') as 'First Name',
coalesce(contacts.lastname,'') as 'Last Name',
coalesce(contacts.contact_id,'') as 'Maghub Contact ID',
c... |
-- get the hostname from a host:port instance label
CREATE OR REPLACE FUNCTION instance_host(t TEXT) RETURNS TEXT
AS $$
SELECT REGEXP_REPLACE(t, '(.*):[0-9]+', '\1')
$$
LANGUAGE SQL
STABLE
RETURNS NULL ON NULL INPUT; |
<gh_stars>10-100
---
-- these triggers are used for user synchronization from one wikiarguments instance to another
---
DROP TRIGGER IF EXISTS `sync_users_insert`;
DELIMITER $$
-- copy new users from one wikiarguments db to another
CREATE TRIGGER `sync_users_insert` AFTER INSERT ON `users`
FOR EACH ROW
BEGIN
I... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : luhix
Source Server Version : 50553
Source Host : localhost:3306
Source Database : ns
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-01-18 18:23:27
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
create table if not exists t_employee(
id int auto_increment primary key,
name varchar(20) not null
);
INSERT INTO t_employee VALUES (1,"jack"),(2,"rose"),(3,"lily"),(4,"lucy"),(5,"black"),
(6,"white"),(7,"james"),(8,"wade"),(9,"bosh"),(10,"curry"); |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table image (
id bigint not null,
name varchar(255),
data bytea,
constraint pk_image primary key (id))
;
create tab... |
<gh_stars>1-10
CREATE TABLE DEMO.DEMOTABLE
(
DEPTID BIGINT IDENTITY(1, 1) NOT NULL
, DEPTNAME VARCHAR(50) NOT NULL
, PARAENTDEPTID BIGINT NOT NULL
); |
<filename>tpc-c/benchmark/run/sql.mysql/buildFinish.sql
-- ----
-- Extra commands to run after the tables are created, loaded,
-- indexes built and extra's created.
-- ----
analyze table bmsql_warehouse;
analyze table bmsql_district;
analyze table bmsql_customer;
analyze table bmsql_history;
analyze table bmsql_oorder... |
<gh_stars>0
DROP PROCEDURE if exists sp_tblToilet_details;
CREATE PROCEDURE sp_tblToilet_Details()
BEGIN
CREATE TABLE IF NOT EXISTS `toilet_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`seat_number` int(11) DEFAULT '0',
`toilet_id` int(11) DEFAULT '0',
`created_by` int(1... |
<filename>sql/schema.sql
CREATE TABLE IF NOT EXISTS accounts (
id INT GENERATED BY DEFAULT AS IDENTITY UNIQUE,
name VARCHAR(60) NOT NULL,
link VARCHAR(200) NOT NULL UNIQUE,
spammed_on TIMESTAMP WITHOUT TIME ZONE DEFAULT NULL
); |
<filename>SQL/banco/venda_produtos.sql
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 03-Abr-2020 às 02:25
-- Versão do servidor: 10.1.34-MariaDB
-- PHP Version: 5.6.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET t... |
<reponame>otto-torino/gino-news
-- phpMyAdmin SQL Dump
-- Application: news
--
--
-- Struttura della tabella `news_article`
--
CREATE TABLE IF NOT EXISTS `news_article` (
`id` int(11) NOT NULL,
`instance` int(11) NOT NULL,
`insertion_date` datetime NOT NULL,
`last_edit_date` datetime NOT NULL,
`date` date N... |
<reponame>chesterton-org/elucidate-server
-- Table: public.annotation_history
-- DROP TABLE public.annotation_history;
CREATE TABLE public.annotation_history
(
id serial NOT NULL,
annotationid integer NOT NULL,
json jsonb NOT NULL,
version integer NOT NULL,
createddatetime timestamp without time z... |
<gh_stars>0
select top 10 abs(datediff(MINUTE, o.PublicDeparture, d.PublicArrival)) as duration, *
from Schedules s
inner join ScheduleLocations o on s.id = o.ScheduleId
inner join ScheduleLocations d on s.id = d.ScheduleId
where s.Toc = 'CS'
and (s.RunsFrom < getdate() and s.RunsTo > getdate() and s.DayMask & 4 = 4)
a... |
<reponame>steveoro/goggles_admin<filename>db/diff.applied/202002291011prod_19102_schedule.sql
-- Leega
-- 29/02/2020
-- Update CSI Prova 3 schedule
-- select * from meeting_sessions ms where ms.meeting_id = 19102;
update meeting_sessions set warm_up_time = '09:00', begin_time = '09:40' where id = 3272;
update meetings... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.