sql stringlengths 6 1.05M |
|---|
INSERT INTO burgers (burger_name, devoured) VALUES ('Rodeo', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Sunrise', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Snydz', false);
|
<filename>nemo/src/main/resources/db/changelog/job_opportunity.sql
INSERT INTO job_opportunity
(jo_name, description, contract_type,working_hours,salary_range_ini,salary_range_end,gender,availability,workplace_country,workplace_city,workplace_neighborhood,workplace_street,workplace_home_number,workplace_compleme... |
<reponame>CAG9/SQL-Interview-Questions<gh_stars>0
SELECT DISTINCT sub.user_id
FROM(
SELECT *,
LAG(created_at) OVER( PARTITION BY user_id ORDER BY user_id, created_at) as lag_date
FROM amazon_transactions
ORDER BY user_id, created_at) sub
WHERE DATEDIFF(sub.created_at,sub.lag_date) >= 0 AND DATEDIFF(sub... |
DROP FUNCTION create_order CASCADE; |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3308
-- Généré le : lun. 01 juin 2020 à 21:16
-- Version du serveur : 5.7.28
-- Version de PHP : 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<filename>examples/UsingMariaDB/mydb.sql
-- Adminer 4.7.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
CREATE DATABASE `mydb` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `mydb`;
DROP TABLE IF EXISTS `user`;
CREATE TABL... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 06, 2021 at 06:14 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>DonaldLouch/website
/*
Warnings:
- You are about to drop the column `tagLine` on the `BlogPosts` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE `BlogPosts` DROP COLUMN `tagLine`,
ADD COLUMN `headingText` VARCHAR(300) NULL;
|
SELECT `deposit_group`
FROM `wizzard_deposits`
GROUP BY `deposit_group`
ORDER BY AVG(`magic_wand_size`) ASC
LIMIT 1; |
<reponame>rizkyraf8/projectweb2-ali<filename>db/db_project2.sql
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Jul 2020 pada 05.34
-- Versi server: 10.1.32-MariaDB
-- Versi PHP: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STAR... |
<filename>Database/dbo.Database - Analysis - Space - Indexes.sql
--=================================================================================================
-- Output information about the space used by the indexes in this database.
--============================================================================... |
<gh_stars>0
CREATE TABLE `orders` (
`id` bigint(20) NOT NULL,
`total_cost` decimal(19,2) NOT NULL,
`user_id` bigint(20) NOT NULL,
`status` varchar(32) NOT NULL,
`create_time` datetime DEFAULT CURRENT_TIMESTAMP,
`update_time` datetime DEFAULT NULL,
`pay_channel` varchar(500) DEFAULT NULL,
PRIMARY KEY (`i... |
<reponame>team-earth-final/music-lyfe2<gh_stars>0
DROP TABLE IF EXISTS users_tracks;
DROP TABLE IF EXISTS tracks;
DROP TABLE IF EXISTS app_users;
CREATE TABLE app_users (
id SERIAL PRIMARY KEY,
fave_artist VARCHAR(255),
display_name VARCHAR(255),
spotify_user_id VARCHAR(255) UNIQUE
);
CREATE TABLE tra... |
create or replace view tasks_pri_lean as
-- classification and select
select
id,
sum(coalesce(g.pri,0)) tot_pri,
count(*) cnt
-- ,array_agg(coalesce(dh.depid)) depids
-- tag/priority definitions
from tags g
-- tasks tagging info
right outer join lateral (
select
id,
jsonb_array_elements_text(contents... |
CREATE OR REPLACE FUNCTION update_pathology_observations_nresult_from_trigger() RETURNS TRIGGER AS $body$
DECLARE
BEGIN
IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN
NEW.nresult = convert_to_float(NEW.result, NULL);
END IF;
RETURN NEW ;
END $body$ LANGUAGE plpgsql;
COMMENT ON FUNCTION update_pathology_obser... |
<gh_stars>1-10
CREATE TABLE `languages` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 NOT NULL,
`suffix` varchar(50) CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `name` (`name`),
UNIQUE KEY `suffix` (`suffix`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
<gh_stars>10-100
-- Revert seattleflu/schema:warehouse/identifier/indexes/identifier_barcode_slices_null from pg
begin;
drop index warehouse.identifier_barcode_slices_is_null_idx;
commit;
|
<filename>Load/lib/sql/orthomclEdgesSchemaMySql.sql
CREATE DATABASE apidb;
USE apidb;
CREATE TABLE apidb.SimilarSequences (
QUERY_ID VARCHAR(15),
SUBJECT_ID VARCHAR(15),
QUERY_TAXON_ID VARCHAR(15),
SUBJECT_TAXON_ID VARCHAR(15),
EVALUE_MANT BIGIN... |
<reponame>Sistemium/ASA.aws<gh_stars>0
create or replace function aws.metricDataMemberDimension (
@name STRING,
@value int,
@n int default 1,
@memberN int default 1
) returns text
begin
return string(
'&MetricData.member.', @memberN, '.Dimensions.member.', @n, '.Name=', @name,
'&Met... |
<gh_stars>100-1000
select
r_name,
c,
rank() over (order by r_regionkey) as ran
from (
select
r_name,
r_regionkey,
count(*) as c
from
region
group by
r_name, r_regionkey
) a; |
<filename>services/headless-lms/migrations/20210701085008_create_email_template.down.sql
-- Add down migration script here
DROP TABLE email_templates;
|
drop index IDX_ORDERMAN_CUSTOMER_UNIQ_EMAIL ;
|
<reponame>salspaugh/queryutils
create index sessions_user_id on sessions(user_id);
create index parsetrees_query_id on parsetrees(query_id);
create index queries_session_id on queries(session_id);
|
drop table if exists states;
create table states (
id int unsigned not null auto_increment,
name varchar(50) not null,
primary key(id)
) Engine = InnoDB;
drop table if exists counties;
create table counties (
state_id int unsigned not null,
id int unsigned not null auto_increment,
name varchar(50) not null,
pri... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 05 Jan 2022 pada 06.51
-- Versi server: 10.4.22-MariaDB
-- Versi PHP: 8.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
CREATE TABLE IF NOT EXISTS `postal_locations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`postal_code` varchar(8) NOT NULL,
`latitude` decimal(18,15) NOT NULL,
`longitude` decimal(18,15) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE (`postal_code`)
) AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `distance_requests` (
... |
<reponame>tikaakusumaa/moviestation
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 11, 2017 at 10:28 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
IF OBJECT_ID('[Report].[PFRTrailblazerApprenticeshipsOccupancyReport_PSDM_FAM_HelperView]') IS NOT NULL
BEGIN
DROP VIEW [Report].[PFRTrailblazerApprenticeshipsOccupancyReport_PSDM_FAM_HelperView]
END
GO
CREATE VIEW [Report].[PFRTrailblazerApprenticeshipsOccupancyReport_PSDM_FAM_HelperView]
AS
SELECT [LD... |
<gh_stars>0
-- AlterTable
ALTER TABLE "Books" ADD COLUMN "authorId" INTEGER;
-- CreateTable
CREATE TABLE "Author" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
CONSTRAINT "Author_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Books" ADD CONSTRAINT "Books_authorId_fkey" FOREIGN KEY ("author... |
CREATE PROCEDURE dbo.twoDataSets
AS
SET NOCOUNT ON;
SELECT one = 1,
two = '2';
SELECT ReturnCode = 1
GO
|
<filename>schema.sql
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for api-keys
-- ----------------------------
DROP TABLE IF EXISTS `api-keys`;
CREATE TABLE `api-keys` (
`apiKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`secretKey` varcha... |
<reponame>nkelliny1/covid-response<gh_stars>0
--DROPS THE exchange IF IT EXISTS CURRENTLY--
DROP DATABASE IF EXISTS exchange;
--CREATES THE 'exchange' DATABASE --
CREATE DATABASE exchange; |
-- Input to CILamp API
DECLARE @Color VARCHAR(10) = '#0000FF' -- RRGGBB
DECLARE @MyId VARCHAR(400) = 'my-system-id' -- system id 1-80 long; letters, digits, underscore and minus sign allowed
-- Temporary variables
DECLARE @Object AS INT
DECLARE @ResponseText AS VARCHAR(8000)
DECLARE @Status INT
DECLARE @Url VARCHAR(4... |
alter table "public"."comment" alter column "id" set default gen_random_uuid();
alter table "public"."comment" alter column "id" drop not null;
alter table "public"."comment" add column "id" uuid;
|
CREATE OR REPLACE FUNCTION ts.updatechroncontrolagetype(_chroncontrolid integer, _agetypeid integer)
RETURNS void
LANGUAGE sql
AS $function$
UPDATE ndb.chroncontrols
SET agetypeid = _agetypeid
WHERE chroncontrolid = _chroncontrolid
$function$
|
<reponame>jlu-ilr-hydro/odmf
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
... |
<reponame>Shuttl-Tech/antlr_psql
-- file:publication.sql ln:131 expect:true
ALTER PUBLICATION testpub_foo RENAME TO testpub_default
|
use payroll
execute p_add_time_entry @employee_id=64, @entry_date='2019-04-19 00:00:00', @hours_worked=6
execute p_add_time_entry @employee_id=32, @entry_date='2019-04-19 00:00:00', @hours_worked=3
execute p_add_time_entry @employee_id=37, @entry_date='2019-04-19 00:00:00', @hours_worked=3
execute p_add_time_entry @e... |
ALTER TABLE db_version CHANGE COLUMN required_12113_01_mangos_spell_template required_12148_01_mangos_areatrigger_teleport bit;
ALTER TABLE areatrigger_teleport DROP COLUMN required_failed_text;
|
<filename>escreening/src/test/sql/11_veteran_assessments.sql
/* Add an assessment with each state value */
INSERT INTO veteran_assessment (veteran_assessment_id, veteran_id,clinician_id,clinic_id,access_mode,duration,percent_complete,assessment_status_id, created_by_user_id) VALUES (1, 1, 5, 7, 0, 0, 0, 1, 1);
INSERT I... |
select int64_4 from nulls where int64_4 < -46000000000
-47000000000
|
<gh_stars>10-100
-- index on study.external_reference
ALTER TABLE study add index external_reference_idx(external_reference);
INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL, 'patch', 'patch_85_86_c.sql|add index on study.external_reference');
|
<filename>modules/driver-jdbc/src/test/resources/executor_test_files/jdbc/sql_simple_insert.sql
CREATE TABLE IF NOT EXISTS crystalDevs (
firstName VARCHAR(12) NOT NULL
);
INSERT INTO crystalDevs VALUES ('Elise'), ('Tom'); |
<filename>sql/_08_javasp/cases/411-11.sql
autocommit off;
CREATE Procedure ptestint1(i inout int) as language java name 'SpTest5.ptestint1(int) ';
select '10' into x from db_root;
call ptestint1(x);
call ptestint1('10');
call ptestint1('xx');
call ptestint1(null);
$varchar,$10;
call ptestint1(?) ;
drop procedure... |
<reponame>DevotedMC/CivSpy
-- index
create index ssw_serv on spy_stats(server, stat_key);
-- datapoints
select min(stat_time), max(stat_time), count(*) from spy_stats where server is null or server = "devoted";
-- kinds of datapoints
select count(distinct stat_key, string_value), count(distinct stat_key) from spy_sta... |
<gh_stars>0
-- @testpoint:开启事务移动游标位置,参数为prior,默认从当前关联位置开始,将游标移动到上一行;
--前置条件
drop table if exists cur_test_157;
create table cur_test_157(c_id int,c_num int,c_name varchar(10),c_city varchar(10),c_add varchar(20));
insert into cur_test_157 values(1,18,'Allen','Beijing','AAAAABAAAAA'),(2,368,'Bob','Shanghai','AAAAACAAA... |
<reponame>joernb/api-backend
CREATE DOMAIN uint8 AS smallint
CHECK(VALUE >= 0 AND VALUE < 256);
CREATE TABLE IF NOT EXISTS Memo (
id bigserial primary key,
mtype uint8 not null,
mlen uint8 not null,
mdata bytea
);
CREATE TABLE IF NOT EXISTS Report (
id bigserial primary key,
rvk bytea not n... |
<gh_stars>1-10
/**
* OAuth database table schema for MSSQL
*
* @author sumh <<EMAIL>>
* @package Oauth
* @copyright (c) 2011 OALite
* @license ISC License (ISCL)
* @link http://oalite.com
*/
/******************** Add Table: t_oauth_authorizes ************************/
/* Build Table Stru... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 02, 2018 at 02:43 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- ---------- MIGRONDI:UP:1622307637387 --------------
CREATE TABLE games (
id SERIAL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
code VARCHAR(10) NOT NULL,
password VARCHAR (20) NOT NULL,
created TIMESTAMP NOT NULL,
updated TIMESTAMP NOT NULL
);
-- ---------- MIGRONDI:DOWN:1622307637387 ----------... |
<reponame>grishmathakkar/TestCure<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 27, 2016 at 11:05 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... |
SET @iLastHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_spy_profiles_activity');
DELETE FROM `sys_alerts` WHERE `unit` = 'profile' AND `action` = 'delete' AND `handler_id` = @iLastHandler;
UPDATE `sys_modules` SET `version` = '1.0.4' WHERE `uri` = 'spy' AND `version` = '1.0.3';
|
-- # This just a sample/test SQL
update users set first_name="<NAME>" where id=1; |
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: hbpds
-- ------------------------------------------------------
-- Server version 5.5.41-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA... |
CREATE TABLE [dbo].[configuration] (
[id] INT NOT NULL,
[name] VARCHAR (100) NOT NULL,
[value] VARCHAR (MAX) NOT NULL,
[configuration_type] INT NOT NULL,
PRIMARY KEY CLUSTERED ([id] ASC)
);
|
CREATE TABLE IF NOT EXISTS `tbl_prize` (
`prize_id` int(11) NOT NULL,
`prize` int(11) NOT NULL,
`chance` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
ALTER TABLE `tbl_prize` ADD PRIMARY KEY (`prize_id`);
ALTER TABLE `tbl_prize` MODIFY `prize_id` int(11) NOT... |
-- CREATE DATABASE AziendaTirocinante;
-- USE AziendaTirocinante;
CREATE TABLE 191126Azienda
(
id int(10) NOT NULL,
Nome varchar(15),
Luogo varchar(20),
Settore varchar(20),
Tipologia varchar(10),
PRIMARY KEY(id)
);
CREATE TABLE 191126Tutor
(
id int(10) NOT NULL,
Nome varchar(10),
Cognome varchar(... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50710
Source Host : localhost
Source Database : blogwork
Target Server Type : MySQL
Target Server Version : 50710
File Encoding : utf-8
Date: 06/07/2016 21:50:... |
<filename>5.2.3/Database/Constraints/AFW_30_ITEM_CARNT_SPRIN_FK3.sql
SET DEFINE OFF;
ALTER TABLE AFW_30_ITEM_CARNT_SPRIN ADD (
CONSTRAINT AFW_30_ITEM_CARNT_SPRIN_FK3
FOREIGN KEY (REF_AFW_30_PAGE)
REFERENCES AFW_30_PAGE (SEQNC)
ENABLE VALIDATE)
/
|
-- clean up
DROP PROCEDURE IF EXISTS sp_token_fetch;
-- go
CREATE PROCEDURE sp_token_fetch
(
p_tokenId BIGINT
)
this_proc:BEGIN
SELECT
t.tokenId
, t.tokenName
, t.publicKey
, t.privateKey
, t.createdOn
, t.updatedOn
FROM
token t
WHERE
... |
CREATE TABLE programming_languages.kpjsc(
Week DATE NOT NULL PRIMARY KEY
,Kotlin INT NOT NULL
,Java INTEGER NOT NULL
,Python INTEGER NOT NULL
,C INTEGER NOT NULL
,JavaScript INTEGER NOT NULL
);
INSERT INTO programming_languages.kpjsc(Week,Kotlin,Java,Python,C,JavaScript) ... |
SET @user = %d;
DELETE tracking FROM tracking
JOIN users ON users.id = @user AND users.blocked = 0 AND users.deleted = 0
WHERE tracking.id = users.id;
DELETE logins FROM logins
JOIN users ON users.id = @user AND users.blocked = 0 AND users.deleted = 0
WHERE logins.id = users.id; |
START TRANSACTION;
ALTER TYPE institution_state RENAME TO institution_state_old;
CREATE TYPE institution_state AS ENUM ('pending', 'verified');
ALTER TABLE metabase.institution ALTER COLUMN "State" TYPE institution_state USING 'verified';
DROP TYPE institution_state_old;
INSERT INTO "__EFMigrationsHistory" ("Migrati... |
<gh_stars>1-10
/* リスト3-1 SELECT文の例 */
SELECT id,
title,
published_at
FROM book
WHERE published_at > '2017-01-01'
ORDER BY published
LIMIT 10;
/* リスト3-2 基本的なSELECT文の例 */
SELECT id
FROM b1;
/* リスト3-4 title列を指定したSELECT句 */
SELECT title
FROM b1;
/* リスト3-6 2つの列を指定したSELECT文 */
SELECT id,
titl... |
<reponame>ChiefInnovator/Developing-Microsoft-Azure-Solutions
CREATE TABLE [dbo].[BoardUser]
(
[UserId] INT NOT NULL,
[Email] NVARCHAR(1024) NOT NULL,
[Name] NVARCHAR(255) NOT NULL,
[LastWorkout] DATETIME NOT NULL,
CONSTRAINT [PK_BoardUser] PRIMARY KEY CLUSTERED ([UserId]),
)
|
DROP DATABASE IF EXISTS hotel_db;
CREATE DATABASE hotel_db;
USE hotel_db; |
-- file:alter_table.sql ln:1923 expect:true
DROP TABLE unlogged1
|
-- file:arrays.sql ln:551 expect:true
select array_to_string(array[1,2,3,4,NULL,6], NULL)
|
<filename>packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.6.0d2-5.6.0d3.sql
create function inline_0 ()
returns integer as '
begin
perform acs_attribute__create_attribute (
''acs_object'',
''modifying_user'',
''integer'',
''Modifying User'',
null,
null,
null,
null,
1,
1,
null,
... |
<gh_stars>1-10
INSERT INTO
sso.oauth2_code_table("client_id", "csrf", "provider", "target", "ttl", "pkce", "redirect_uri", "state", "scope")
VALUES
($1, $2, $3, $4, sso._ttl_timestamptz($5), $6, $7, $8, $9)
RETURNING
"csrf"
|
<reponame>austin48/etudes-melete<filename>components/src/sql/oracle/melete28m1_upgrade.sql
CREATE TABLE melete_bookmark (
BOOKMARK_ID NUMBER(11) DEFAULT '0' NOT NULL,
SECTION_ID NUMBER(11) DEFAULT '0' NOT NULL,
USER_ID VARCHAR2(99) DEFAULT NULL,
SITE_ID VARCHAR2(99) DEFAULT NULL,
TITLE VARCHAR2(99) DEFAULT ''... |
<gh_stars>0
create or replace package ut_coverage authid current_user is
/*
utPLSQL - Version 3
Copyright 2016 - 2021 utPLSQL Project
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
... |
ALTER TABLE `users` ADD `user_builtin` tinyint(1) unsigned NOT NULL default 0;
UPDATE `users` set user_builtin=1 WHERE user_name IN ('Sysop', 'MindTouch Support', 'Anonymous');
|
-- database: presto; groups: distinct; tables: region
SELECT DISTINCT r_name FROM region
|
------------------------------
--
-- Create standard_np_outcome_drilldown table for use in joins to get all cases for a natural product (NP)/outcome pair count
-- Also, rolls up to the NP preferred term
--
-- LTS COMPUTING LLC
------------------------------
-- set search_path = faers;
SET search_path = scratch_rich;
... |
<reponame>antontarasenko/Social-Media-Queries<filename>gdelt/summary.sql<gh_stars>1000+
-- Summary
select
count(*) count_rows,
min(SQLDATE) first_date,
max(SQLDATE) last_date,
count(unique(Actor1Name)) as count_unique_Actor1Name,
count(unique(Actor2Name)) as count_unique_Actor2Name
from
[gdelt-bq:full.eve... |
DELETE FROM waffle_flag_amo WHERE name = 'accept-webapps';
DELETE FROM waffle_flag_mkt WHERE name = 'accept-webapps';
|
-- @testpoint: opengauss关键字deallocate(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists deallocate_test;
create table deallocate_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists deallocate;
create synonym deallocate for deallocate_test;
insert into deallocate values (1,'ada'),(2, 'bob');
update d... |
--
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
--
-- Name: EXTENSION unaccent; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';
--
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; O... |
<reponame>vtojeiroa/Ejercicios-Variados-Bootcamp
CREATE DATABASE notas;
use notas;
create table lista_notas(
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
texto VARCHAR(65500)
);
Select * from lista_notas;
|
" INSERT INTO KHACHHANG(Ma, Ten, GioiTinh, SoCMT, SoDienThoai, Email) values (@Ma varchar(10), @Ten nvarchar(40), @GioiTinh bit, @SoCMT varchar(15), @SoDienThoai varchar(15), @Email varchar(100))" |
create function add_self_closure() returns trigger as $add_self_closure$
begin
insert into comments_closure (parent_id, child_id, depth)
values (new.id, new.id, 0);
if (new.parent_id is not null) then
insert into comments_closure (parent_id, child_id, depth)
... |
select * from bill_info
declare
name bill_info.item_name%type;
price bill_info.item_price%type;
cursor info is select item_name,item_price from bill_info where item_price>10;
begin
open info;
dbms_output.put_line('AMT '||'ITEM NAME');
dbms_output.put_line('');
loop
fetch info into... |
-- Deploy schemas/status_public/procedures/user_achieved to pg
-- requires: schemas/status_public/schema
-- requires: schemas/status_public/procedures/steps_required
-- requires: schemas/status_public/tables/level_requirements/table
-- requires: schemas/status_public/tables/user_achievements/table
BEGIN;
CREATE F... |
-- count the number of unique documents containing the word "law" or containing the word "legal" (If a document contains both law and legal, it should only be counted once)
Select Count(distinct docid)
from frequency
where term in ('law', 'legal');
|
CREATE TABLE "rules_tbl" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`selIntface` TEXT,
`txtBufferLimit` TEXT,
`txtBandwidth` TEXT,
`selDelayDistribution` TEXT,
`txtDelay` TEXT,
`txtDelayJitter` TEXT,
`txtDelayCorrelation` TEXT,
`txtReorder` TEXT,
`txtReorderCorrelation` TEXT,
`txtGap` TEXT,
`... |
alter table organizations add default_approval int
go
delete from phrases where label = 'org.when_requests_entered'
delete from phrases where label = 'org.requests_automatically_approved'
delete from phrases where label = 'org.requests_manually_approved'
delete from phrases where label = 'request.report_abuse'
INSE... |
DROP TABLE IF EXISTS job_info; |
<reponame>klebsonm/SGQ-ETE
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: testep1.mysql.dbaas.com.br
-- Generation Time: 07-Maio-2018 às 15:43
-- Versão do servidor: 5.6.35-81.0-log
-- PHP Version: 5.6.30-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRA... |
#
# Table structure for table 'acct_param_table'
#
CREATE TABLE acct_param_table (
`param_index` int(11) default NULL,
`max_down_speed` int(11) default NULL,
`max_up_speed` int(11) default NULL,
`max_user_conn` int(11) default NULL,
`max_conn_per_ip` int(11) default NULL,
`max_session_time` int(11) default... |
-- file:alter_table.sql ln:186 expect:true
SELECT typname FROM pg_type WHERE oid = '_tmp_array[]'::regtype
|
<gh_stars>0
-- /packages/intranet-exchange-rate/sql/postgresql/intranet-exchange-rate-create.sql
--
-- ]project-open[ Exchange Rate Module
-- Copyright (c) 2003 - 2009 ]project-open[
--
-- All rights reserved. Please check
-- http://www.project-open.com/license/ for details.
-- @author <EMAIL>
------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 09, 2016 at 10:17 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<filename>working/manual_changes/2021/2021-08-16.sql
--rename PHDSC vocabulary to SOPT [AVOF-3232]
do $$
declare
cOldVocabulary constant varchar(100):='PHDSC';
cNewVocabulary constant varchar(100):='SOPT';
begin
alter table vocabulary drop constraint fpk_vocabulary_concept;
alter table concept drop constraint fpk_c... |
<filename>database.sql
DROP DATABASE IF EXISTS biblioteca;
CREATE DATABASE IF NOT EXISTS biblioteca;
USE biblioteca;
DROP TABLE IF EXISTS livros;
CREATE TABLE IF NOT EXISTS livros(
id int(11) not null auto_increment,
cod_livro varchar(50),
nome_livro varchar(250),
desc_livro varchar(250),
PRIMARY KEY(id));
INSERT I... |
<filename>migration/mule/transform-mysql-cdc/resources/data.sql
CREATE SCHEMA ETL;
USE ETL;
CREATE TABLE ORDERS
(
OrderID varchar(45) NOT NULL,
RetailerID varchar(45) DEFAULT NULL,
ProductIDs varchar(45) DEFAULT NULL
);
CREATE TABLE RETAILERS
(
RetailerID varchar(45) NOT NULL,
Retailer var... |
<reponame>guerlab/flowable-engine
CREATE TABLE PUBLIC.ACT_CMMN_HI_PLAN_ITEM_INST (ID_ varchar(191) NOT NULL, REV_ INT NOT NULL, NAME_ varchar(191), STATE_ varchar(191), CASE_DEF_ID_ varchar(191), CASE_INST_ID_ varchar(191), STAGE_INST_ID_ varchar(191), IS_STAGE_ BOOLEAN, ELEMENT_ID_ varchar(191), ITEM_DEFINITION_ID_ ... |
<gh_stars>0
select *
from {{ var('downloads_territory') }}
|
CREATE TABLE IF NOT EXISTS `__PREFIX__attachment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '后台用户id',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '前台用户id',
`name` varchar(55) NOT NULL DEFAULT '' COMMENT '名称',
`mime` ... |
-- +migrate Up notransaction
ALTER TYPE engine_processing_type ADD VALUE IF NOT EXISTS 'metrics';
-- +migrate Down
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.