sql stringlengths 6 1.05M |
|---|
DROP FUNCTION IF EXISTS core.create_menu
(
_sort integer,
_app_name text,
_i18n_key national character varying(200),
_menu_name text,
_url text,
_i... |
<reponame>Alexmajor1/php
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Июл 20 2021 г., 06:56
-- Версия сервера: 10.4.11-MariaDB
-- Версия PHP: 7.3.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>kuro-channel/knowledge-1<gh_stars>100-1000
SELECT * FROM LOGIN_HISTORIES
WHERE
LOGIN_COUNT = ?
;
|
set names utf8;
CREATE TABLE t1 (a VARCHAR(10) default 'A', b varchar(10) ) collate utf8_en_cs
PARTITION BY LIST (a) (
PARTITION a1 VALUES IN ('a')
);
insert into t1 values ('a', 'a');
insert into t1 values ('A', 'A');
insert into t1 values (default, 'A');
insert into t1 values (default(a), 'A');
insert into t1 v... |
INSERT INTO `tabledefs` (`uuid`, `displayname`, `prefix`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortord... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2019 at 05:38 PM
-- 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... |
<filename>sqlite_101.sql
SELECT albumid, title
FROM albums
ORDER BY title
LIMIT 10;
sqlite> .mode column
sqlite> .header on
sqlite> .read c:/sqlite/commands.txt
--Querying data from a table using the SELECT statement
SELECT DISTINCT column_list
FROM table_list
JOIN table ON join_condition
WHERE row_filter
ORDE... |
-- Table: public.categories
-- DROP TABLE public.categories;
CREATE TABLE public.categories
(
id integer NOT NULL DEFAULT nextval('categories_id_seq'::regclass),
name character varying(500) COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT categories_pkey PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
)
TABLE... |
<filename>sql/get/feed/search/with_language.sql
SELECT f.id, f.title,
f.description, f.subtitle,
f.url, img.link as img,
f.link_web, author.name as author_name,
feed_language.name as language, f.submitted,
img.filename as img_cache
FROM
feed f JOIN author ON author.id = f.a... |
CREATE FUNCTION fnVehiculosDeClientes_SeleccionarTodo ()
RETURNS TABLE
AS
RETURN
SELECT * FROM vwVehiculosDeClientes_SeleccionarTodos |
INSERT INTO public."__EFMigrationsHistory" ("MigrationId","ProductVersion") VALUES
('20211120064143_init','6.0.0'),
('20211121044633_FixProductCategoryRls','6.0.0'),
('20211121074749_userinfo','6.0.0'),
('20211121144522_addOrderContext','6.0.0'),
('20211121145300_addOrderUserPayment','6.0.0'); |
<gh_stars>0
INSERT INTO servicos (descricao) VALUES('ABERTURA DE EMPRESA');
INSERT INTO servicos (descricao) VALUES('ALTERAÇÃO DE EMPRESA');
INSERT INTO servicos (descricao) VALUES('CONTRATO COMPRA E VENDA');
INSERT INTO servicos (descricao) VALUES('CONTRATO DE ALUGUEL');
INSERT INTO servicos (descricao) VALUES('CO... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:8889
-- Generation Time: 14 Mei 2019 pada 17.14
-- Versi Server: 5.6.35
-- PHP Version: 7.0.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `tesis_weather`
--
-- -------------... |
<reponame>jjradha/hello-world
declare @oldest_date datetime = dateadd(day,-7,getdate()); -- server time
DECLARE @backup_set_id TABLE (backup_set_id INT)
DECLARE @media_set_id TABLE (media_set_id INT)
DECLARE @restore_history_id TABLE (restore_history_id INT)
INSERT INTO @backup_set_id (backup_set_... |
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 09, 2017 at 02:15 PM
-- Server version: 5.5.55-0+deb8u1
-- PHP Version: 5.6.30-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>Bhaskers-Blu-Org2/code-snacks-sql2016
USE [taxidata]
GO
CREATE PROCEDURE [dbo].[ClusterTaxiData]
AS
BEGIN
DECLARE @inquery nvarchar(max) = N'
select tipped, passenger_count, trip_time_in_secs, trip_distance, direct_distance
from nyctaxi_features
'
EXEC sp_execute_external_scri... |
<filename>mysql-exercise/DBA/table_disk_size.sql
/*SELECT CONCAT(ROUND((data_length)/(1024*1024*1024), 6), ' GB') AS 'Total Data Size' ,CONCAT(ROUND((index_length)/(1024*1024*1024), 6), ' GB') AS 'Total Index Size',table_name FROM information_schema.TABLES WHERE table_schema LIKE 'testdb' order by 'Total Data Size';*/... |
drop view Employee_view;
drop view Project_Employee_view;
drop view Manager_view;
drop view Interim_Manager_view;
drop view President_view;
drop view Previous_Employee_view;
drop view Previous_Project_view;
drop view Current_Project_view;
create view Employee_view as select Person_ID, First_Name, Last_Name, Home_Addre... |
<reponame>BearerPipelineTest/sqlc
-- name: GetAll :many
SELECT * FROM users;
|
<reponame>riceissa/aiwatch
insert into positions(person, organization, title, start_date, start_date_precision, end_date, end_date_precision, urls, notes, ai_safety_relation, subject, employment_type, cause_area) values
('<NAME>', 'Center for Reducing Suffering', 'Co-founder', '2020-01-01', 'year', NULL, NULL, 'http:/... |
/*
Navicat Premium Data Transfer
Source Server : gp
Source Server Type : MySQL
Source Server Version : 50720
Source Host : localhost
Source Database : gp
Target Server Type : MySQL
Target Server Version : 50720
File Encoding : utf-8
Date: 03/28/2020 00:02:48 AM
*/
SET... |
<filename>db/samples/mysql/create-ado-mysql.sql<gh_stars>0
/* Copied from ado-mysql.sql*/
/* File generated automatically by dynamo */
/* Entity table that enumerates all known database tables */
CREATE TABLE IF NOT EXISTS entity_type (
/* the database table unique entity index */
`id` INTEGER AUTO_INCREMENT,
/*... |
<gh_stars>10-100
-- MySQL dump 10.13 Distrib 5.5.34, for osx10.6 (i386)
--
-- Host: localhost Database: magento-virgin
-- ------------------------------------------------------
-- Server version 5.5.34
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
<filename>src/main/resources/mysql/xxshop.sql
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50720
Source Host : localhost
Source Database : xxshop
Target Server Type : MySQL
Target Server Version : 50720
File Encodi... |
-- Name: AdHocStonyBrookQueryNumOfPatientsWithMultipleActivities
-- Schema: posda_files
-- Columns: ['num_activities', 'num_patients']
-- Args: []
-- Tags: []
-- Description: Find patients in multiple StonyBrook activities
--
select distinct num_activities, count(*) as num_patients from (
select distinct patient_id, ... |
DROP TABLE IF EXISTS truncate_test;
CREATE TABLE truncate_test(uint8 UInt8) ENGINE = Log;
INSERT INTO truncate_test VALUES(1), (2), (3);
SELECT * FROM truncate_test ORDER BY uint8;
TRUNCATE truncate_test;
SELECT * FROM truncate_test ORDER BY uint8;
DROP TABLE truncate_test;
|
<gh_stars>0
#
# Drop CLDS database objects (tables, etc.)
#
ALTER TABLE template
DROP FOREIGN KEY template_image_id_fkey01;
ALTER TABLE template
DROP FOREIGN KEY template_bpmn_id_fkey01;
ALTER TABLE template
DROP FOREIGN KEY template_doc_id_fkey01;
ALTER TABLE model
DROP FOREIGN KEY template_id_fkey0... |
\c postgres
drop database recipes;
create database recipes;
\c recipes
-- TYPES --
CREATE TYPE "measure_type" AS ENUM (
'unspecified',
'small_amount',
'quantity',
'range'
);
CREATE TYPE "effort_score" AS ENUM (
'minimal',
'low',
'medium',
'high',
'extreme'
);
-- SCHEMAS --
CREATE SCHEMA "general";... |
<filename>SQL/users.sql
/****** Object: Table [dbo].[users] Script Date: 1/24/2021 7:23:52 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[users]
(
[id] [int] IDENTITY(1,1) NOT NULL,
[email] [varchar](50) NOT NULL,
[username] [varchar](50) NOT NULL,
[password] [varc... |
-- ************************************************************************************************
-- Valencia Construction - SQL Part 2 *
-- Exhibits script *
-- Author : <NAME>, ... |
<gh_stars>0
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND SCHEMA_NAME([schema_id]) = 'EPONS' AND QUOTENAME(name) = '[FindCurrentEpisodeOfCare]')
DROP PROCEDURE [EPONS].[FindCurrentEpisodeOfCare]
GO
CREATE PROCEDURE [EPONS].[FindCurrentEpisodeOfCare]
@patientId UNIQUEIDENTIFIER
AS
SELECT
[episodeOfCare... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 100131
Source Host : localhost:3306
Source Database : football
Target Server Type : MYSQL
Target Server Version : 100131
File Encoding : 65001
Date: 2018-08-22 10:04:11
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
<reponame>Konstantin751/glinv<gh_stars>0
CREATE OR REPLACE FUNCTION trigger_set_timestamp()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated = NOW();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
|
-- assumes database collation is:
-- utf8_unicode_ci
-- drop relationship tables
DROP TABLE IF EXISTS CapabilityFramework;
DROP TABLE IF EXISTS FrameworkSolution;
DROP TABLE IF EXISTS FrameworkStandard;
DROP TABLE IF EXISTS ClaimedCapabilityStandard;
DROP TABLE IF EXISTS CapabilityStandard;
DROP TABLE IF EXISTS Cla... |
<filename>task10.sql
select neighbourhood, avg(beds)
from airbnb_search_details
group by neighbourhood
having sum(beds) > 2
order by avg(beds) desc |
SELECT * FROM (VALUES(1,2,3)) AS t |
<reponame>treebat1/SQLJobs
EXEC msdb.dbo.sp_help_jobhistory
@job_name = N'_dly_2000_M-F_DiffBackups'
, @step_id = 2
--, @minimum_run_duration = 100 --HHMMSS format
, @mode = 'full'
--, @mode = 'summary'
--, @run_status = 0;
, @start_run_date = '20181001'
GO |
<filename>app/addons/blog/database/demo_ru.sql<gh_stars>1-10
REPLACE INTO ?:page_descriptions (page_id, page, description, lang_code) VALUES('7', 'Блог', '', 'ru');
REPLACE INTO ?:page_descriptions (page_id, page, description, lang_code) VALUES('40', 'Байки для реально крепких парней! Мы завезли настоящие Evolve!', '<... |
INSERT INTO `nflp_schedule` VALUES ('1','1','2017-08-9 19:30:00','CAR',null,'HOU',null,'0','0');
INSERT INTO `nflp_schedule` VALUES ('2','1','2017-08-10 19:00:00','MIA',null,'ATL',null,'0','0');
INSERT INTO `nflp_schedule` VALUES ('3','1','2017-08-10 19:00:00','BUF',null,'MIN',null,'0','0');
INSERT INTO `nflp_schedule`... |
<reponame>IvanStoikov/esx_bitcoin<filename>[bitcoin]/esx_bitcoin/localization/en_esx_drugs.sql
INSERT INTO `items` (name, label, `limit`) VALUES
('weed', 'Weed', 50),
('weed_pooch', 'Bag of weed', 10),
('coke', 'Cocaine', 50),
('coke_pooch', 'Bag of cocaine', 10),
('meth', 'Meth', 50),
('meth_pooch', 'Bag of meth... |
INSERT INTO survey.legalbasis ( ref, longname ) VALUES ( 'Voluntary', 'Voluntary' ); |
<gh_stars>10-100
INSERT INTO person (email, email_validated, email_validation_token, password_reset_token, password, role, firstname, lastname, manager_id, expected_calories_per_day) VALUES
('<EMAIL>', true, NULL, NULL, '$2b$10$9dLZKYh.NEVxUCxj3Tc.Weqv1GJUiJHe0z99hd9oJH7PWXYcV350a', 'admin', 'Vincent', 'Cordobes', NUL... |
INSERT INTO `sys_rules` (`id`, `module_id`, `name`, `description`, `status`, `created_at`, `updated_at`, `deleted_at`)
VALUES
(null, 8, 'View List', NULL, 1, '2020-08-09 16:51:34', '2020-08-09 16:51:34', NULL);
|
ALTER TABLE `blockchains` ADD `default_image_id` INT NULL DEFAULT NULL AFTER `only_game_id`;
UPDATE blockchains SET default_image_id=73 WHERE blockchain_name='Litecoin';
UPDATE blockchains SET default_image_id=35 WHERE blockchain_name='Bitcoin';
ALTER TABLE `blockchains` ADD `rpc_last_time_connected` INT NULL DEFAULT N... |
DROP DATABASE IF EXISTS employees_db;
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE department
(id INT PRIMARY KEY AUTO_INCREMENT,
department_name VARCHAR(30)
);
CREATE TABLE roles
(id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(30),
salary DECIMAL(10,2),
department_id INT
);
CREATE TABLE employee... |
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5576280_sys_drop_C_ProjectIssueMA.sql
-- 2021-01-13T07:01:31.236Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Table_Trl WHERE AD_Table_ID=761
;
-- 2021-01-13T07:01:31.241Z... |
<reponame>g4brielvs/usaspending-api
-- Enhance subawards with cfda data.
update
temp_load_subawards_subaward
set
cfda_id = cfda.id,
cfda_number = cfda.program_number,
cfda_title = cfda.program_title
from
broker_subaward bs
inner join references_cfda cfda on
cfda.program_number = spl... |
UPDATE creature_template SET ScriptName='npc_totem_of_spirits' WHERE entry=21071;
DELETE FROM scripted_event_id WHERE id IN (13513,13514,13515,13516);
INSERT INTO scripted_event_id VALUES
(13513,'event_spell_soul_captured_credit'),
(13514,'event_spell_soul_captured_credit'),
(13515,'event_spell_soul_captured_credit'),... |
CREATE TABLE IF NOT EXISTS permissions (
id bigserial PRIMARY KEY,
permission_name character varying(64) NOT NULL,
description character varying(128) NOT NULL,
rid int default 0,
deleted boolean NOT NULL default false
);
insert into permissions (id,permission_name,description,rid,deleted) values (1,'all','ad... |
<filename>dbt-greenery/snapshots/products_snapshot.sql<gh_stars>0
{% snapshot products_snapshots %}
{{
config(
target_schema='snapshots',
unique_key='id',
strategy='check',
check_cols=['product_id']
)
}}
SELECT
*
FROM {{ source('tutorial','products')}}
{% endsnapshot ... |
/*********************************************************************************
# Copyright 2015 Observational Health Data Sciences and Informatics
#
#
# 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... |
alter table "public"."magistrat" add column "share_email" boolean
not null default 'false';
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
<reponame>sansx/create-rust-app
CREATE TABLE todos (
id SERIAL PRIMARY KEY,
text TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);
SELECT manage_updated_at('todos');
|
-- Test that pg_partitions view does not lock a table.
-- 6X used to acquire lock on partition tables when query
-- gp_partitons view. See `expr_has_vars` in ruleutils.c
-- for more details.
create table pg_partitions_ddl_tab(a int, b int)
distributed by (a) partition by range (b)
( start (1) end (20) every(5::float) )... |
<filename>database/candidate_data.sql
DROP TABLE IF EXISTS `Candidate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Candidate` (
`CandidateID` int(11) NOT NULL AUTO_INCREMENT,
`jobInterest` varchar(64) DEFAULT NULL,
`jobType` varchar(... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 21, 2019 at 01:48 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
create or replace PROCEDURE getBook(personID in INTEGER, get_pid in INTEGER)
AS
book integer;
person integer;
hasPayed integer;
isAuthor integer;
isBook CHAR;
BEGIN
--Check that the book exists
if bookExists(get_pid) = 'F' then
DBMS_OUTPUT.PUT_LINE('The Book does not exist...');
RETURN;
else
... |
--DROP TABLE IF EXISTS TestResultTypes
CREATE TABLE TestFailureTypes (
TestFailureTypeID int NOT NULL PRIMARY KEY IDENTITY(1,1),
TestFailureTypeName NVARCHAR(MAX) NOT NULL
)
INSERT INTO TestFailureTypes
VALUES ('Assertion')
INSERT INTO TestFailureTypes
VALUES ('Exception')
SELECT * FROM TestFailureTypes |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Jan 21, 2022 at 04:35 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<reponame>joaocruz123/Lab-Nutri
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 02-Dez-2016 às 20:53
-- Versão do servidor: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<filename>includes/database/upgrade/(db_name)/v.0.0.4_usersfix2.sql
ALTER TABLE `users` ADD `website` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL;
ALTER TABLE `users` ADD `facebook` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL;
ALTER TABLE `users` ADD `twitter` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL;... |
CONNECT TO SAMPLE;
CREATE OR REPLACE FUNCTION SLEEP (SECOND INTEGER)
RETURNS INTEGER
SPECIFIC SLEEP_WITH_RETURN0
LANGUAGE C
PARAMETER STYLE SQL
DETERMINISTIC
FENCED
NO SQL
NO EXTERNAL ACTION
EXTERNAL NAME 'sleep!sleeper'
;
GRANT EXECUTE ON FUNCTION SLEEP TO PUBLIC;
CONNECT RESET... |
<reponame>alex-kukhtin/A2v10.Web.Sample
------------------------------------------------
create or alter procedure a2v10sample.[Document.Index]
@UserId bigint,
@Kind nvarchar(32)
as
begin
set nocount on;
select [Documents!TDocument!Array] = null, [Id!!Id] = Id, [Date], [No], [Sum], [Memo], DateCreated,
[Agent!TAgen... |
<gh_stars>1-10
CREATE TABLE `sap_purchase_order_item_data_with_address`
(
`PurchaseOrder` varchar(10) NOT NULL,
`PurchaseOrderItem` varchar(5) NOT NULL,
`PurchaseOrderItemText` varchar(40) DEFAULT NULL,
`Plant` varchar(4) DEFAULT NULL,
`StorageLocation` ... |
<gh_stars>1-10
USE [VipunenTK_SA]
GO
/****** Object: View [dbo].[v_sa_5_3_Yliopistojen_tutkimustyovuodet_ja_tutkimusmenot_rahoituslahteittain_menolajeittain_yliopistoittain] Script Date: 28.5.2019 15:45:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[v_sa_5_3_Yliopis... |
<gh_stars>1-10
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `otter` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
USE `otter`;
CREATE TABLE `ALARM_RULE` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`MONITOR_NAME` varchar(1024) DEFAULT NULL,
`RECEIVER_KEY` varchar(1024) DEFAULT NULL,
`STATUS` var... |
-- 2018-08-20T11:55:51.667
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,540404,'(C_ProjectType.AD_Org_ID = @AD_Org_ID/-1@) or (C_ProjectType.AD_Org_ID =... |
<filename>DB1/exercises/09.sql
-- Clients without orders yet | using `NOT` and `IN`
SELECT * FROM Customers
WHERE CustomerID NOT IN (SELECT CustomerID FROM Orders);
|
INSERT INTO `casbin_rule` (`p_type`, `v0`, `v1`, `v2`, `v3`, `v4`, `v5`)
VALUES
('g','1','1','','','',''),
('g','40','1','','','',''),
('g','24','1','','','',''),
('g','24','4','','','',''),
('g','31','1','','','',''),
('g','138','9','','','',''),
('g','136','8','','','',''),
('g','1','1','','','',''),
('g','3... |
--liquibase formatted sql
/*
* Copyright 2021 EPAM Systems.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... |
<gh_stars>0
DROP TABLE IF EXISTS year_list;
DROP TABLE IF EXISTS person;
DROP TABLE IF EXISTS education;
DROP TABLE IF EXISTS skill;
DROP TABLE IF EXISTS workinfo;
DROP TABLE IF EXISTS school;
DROP TABLE IF EXISTS job;
DROP TABLE IF EXISTS class;
DROP TABLE IF EXISTS rank;
DROP TABLE IF EXISTS workload;
DROP TABLE I... |
CREATE TABLE IF NOT EXISTS `contatos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
|
<gh_stars>1-10
ALTER TABLE BPM_PROCESS ADD COLUMN CODE VARCHAR(64);
ALTER TABLE BPM_PROCESS ADD COLUMN CONF_BASE_ID BIGINT;
ALTER TABLE BPM_PROCESS ADD CONSTRAINT FK_BPM_PROCESS_CONF_BASE FOREIGN KEY(CONF_BASE_ID) REFERENCES BPM_CONF_BASE(ID);
ALTER TABLE BPM_PROCESS DROP COLUMN PROCESS_DEFINITION_KEY;
ALTER TABLE B... |
--****************************************************************
--
-- Copyright Contributors to the GenevaERS Project.
-- SPDX-License-Identifier: Apache-2.0
--
--***********************************************************************
--* ... |
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: apijson.cn Database: sys
-- ------------------------------------------------------
-- Server version 5.7.34-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
<gh_stars>0
-- unix accounts: fix name conflicts between per-user groups and project groups [#660]
-- drop 'gid'
DROP VIEW nss_passwd;
CREATE VIEW nss_passwd AS
SELECT users.unix_uid AS uid,
users.user_name AS login,
users.unix_pw AS passwd,
users.realname AS gecos,
users.shell,
users.user_name A... |
<filename>web/install/we8.sql
/*
Navicat MySQL Data Transfer
Source Server : windows_mysql1
Source Server Version : 50547
Source Host : 127.0.0.1:3306
Source Database : we08e52
Target Server Type : MYSQL
Target Server Version : 50547
File Encoding : 65001
Date: 2016-06-22 15:32:43
... |
<gh_stars>0
def Foo (x : maybe int) = ^ x
def Main = { a = Optional { ^1} ; b = Foo a }
|
--delete from 2 tables with date type column for join condition
create table md_date1(col1 date, col2 char(20));
insert into md_date1 values(date'1999-01-01', 'aaa'), (date'2000-01-01', 'bbb'), (date'2001-01-01', 'ccc'), ('2002-01-01', 'ddd'), ('2003-01-01', 'eee'), ('2004-01-01', 'fff');
insert into md_date1 values... |
<filename>openGaussBase/testcase/KEYWORDS/reassign/Opengauss_Function_Keyword_Reassign_Case0031.sql<gh_stars>0
-- @testpoint:opengauss关键字reassign(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists reassign_test cascade;
--关键字不带引号-合理报错
create table reassign_test(id int,name reassign);
--关键字带双引号-合理报错
create table reassi... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : 172.30.30.224
Source Server Type : MySQL
Source Server Version : 50726
Source Host : 172.30.30.224:3306
Source Schema : gfast_open
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 6500... |
<filename>Documentos/SQL/Populadores/tb_alteracaoestoque.sql
INSERT INTO "tb_alteracaoestoque"("id", "motivo", "datacadastro", "qtdebaixa", "acao", "fk_estoque", "fk_usuario") VALUES (1, 'INC251118134823', '2018-11-25 13:52:07', 1, 'Remoção', 5, 9);
INSERT INTO "tb_alteracaoestoque"("id", "motivo", "datacadastro", "qtd... |
PRAGMA foreign_keys = ON;
DROP TABLE IF EXISTS Users;
CREATE TABLE Users(
id INTEGER PRIMARY KEY AUTOINCREMENT,
email TEXT NOT NULL UNIQUE,
password TEXT NOT NULL,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
DROP TABLE IF EXISTS Lists;
CREATE TABLE Lis... |
INSERT INTO `users` (`id`, `username`, `nickname`, `email`, `password`, `remember_token`, `created_at`, `updated_at`)
VALUES
(1, 'eprochietto', '<PASSWORD>uele', '<EMAIL>', <PASSWORD>', '<PASSWORD>', '2015-12-20 13:29:18', '2015-12-26 11:59:41');
|
<filename>migrations/2021-01-10-081241_add_features_to_score/up.sql
alter table songs add column features int not null default 0; |
<reponame>javitocor/SQL-ZOO-
-- Show the the percentage who STRONGLY AGREE
SELECT A_STRONGLY_AGREE
FROM nss
WHERE question='Q01'
AND institution='Edinburgh Napier University'
AND subject='(8) Computer Science'
-- Show the institution and subject where the score is at least 100 for question 15.
SELECT instit... |
INSERT INTO
`user` (
`uuid`,
`email`,
`password`,
`firstName`,
`lastName`
)
VALUES
(
'b2fb0c51-60a8-4dcb-9e70-225d4dec2cec',
'<EMAIL>',
<PASSWORD>',
'User',
'First'
) |
<gh_stars>0
CREATE TABLE [dbo].[PatronPrizes] (
[PPID] INT IDENTITY (1, 1) NOT NULL,
[PID] INT NULL,
[PrizeSource] INT NULL,
[BadgeID] INT NULL,
[DrawingID] INT NULL,
[PrizeName] VARCHAR (50) NULL,
[RedeemedFlag] BIT ... |
--analyse the profit of a store for a given duration.
CREATE TYPE profitMonitoringRet AS (dt DATE, profit DECIMAL(15,2));
CREATE OR REPLACE FUNCTION profitMonitoring(startDate DATE, endDate DATE, givenStore INT)
RETURNS SETOF profitMonitoringRet AS
$$
DECLARE
dateSk INT;
dayProfit DECIMAL(15,2);
retRo... |
{% set version_usage_stats_list = dbt_utils.get_column_values(table=ref('version_usage_stats_list'), column='full_ping_name', max_records=1000, default=['']) %}
WITH usage_data AS (
SELECT {{ dbt_utils.star(from=ref('version_usage_data'), except=['LICENSE_ID', 'LICENSE_STARTS_AT', 'LICENSE_EXPIRES_AT']) }}
FR... |
USE world;
CREATE TABLE city_export LIKE city;
SHOW CREATE TABLE city_export;
ALTER TABLE city_export MODIFY COLUMN `ID` int NOT NULL;
ALTER TABLE city_export DROP KEY CountryCode;
ALTER TABLE city_export DROP PRIMARY KEY;
ALTER TABLE city_export ENGINE=CSV;
INSERT INTO city_export SELECT * FROM city WHERE CountryCo... |
<reponame>acanales92/SQL-Challenge<filename>Employee_DB_Analysis.sql
-- Data Analysis --
-- 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
JOI... |
<filename>Snippets/20/3 char.sql
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SET NOCOUNT ON;
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
USE AP;
SELECT
VendorName + CHAR(13) + CHAR(10) + VendorAddress1 + CHAR(13)+CHAR(10)+VendorCity+', '+VendorState+' '+ VendorZipCode
FROM
AP..Vendors
WHERE VendorID = 1;
|
<reponame>tiagobarretomc/transmetaisWeb<filename>scripts/comprovante_pesagem.sql
CREATE TABLE `transmetais`.`tipo_veiculo` (
`id` INT NOT NULL AUTO_INCREMENT,
`descricao` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`));
CREATE TABLE `comprovante_pesagem` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dt_emissao` date NO... |
<reponame>lts120784620/nightingale
set names utf8;
drop database if exists n9e_rdb;
create database n9e_rdb;
use n9e_rdb;
CREATE TABLE `user`
(
`id` int unsigned not null AUTO_INCREMENT,
`uuid` varchar(128) not null comment 'use in cookie',
`username` varchar(64) not null comment 'logi... |
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
INSERT INTO DBSINGULAR.TB_MODULO (CO_MODULO, NO_MODULO, URL_CONEXAO) VALUES
(
'${moduleStringIDName}',
'${moduleStringIDName}',
'https://localhost:8443/'
);
insert into dbsingular.tb_parametro (CO_PARAMETRO, CO_MODULO, NO_PARAMETRO... |
<filename>account-parent/account-web/src/test/resources/data-h2.sql
INSERT INTO ACCOUNT(ID, USER_ID, ACCOUNT_NUMBER, DEFAULT_ACCOUNT) values (1, 1, '123456789', FALSE);
|
-- Query (Type JA): TPC-H Q2 - No need for exaplanation. (Only avoid order by)
-- With this query we control the size of the outer table by changing p_size!
select
s_acctbal,
s_name,
n_name,
p_partkey,
p_mfgr,
s_address,
s_phone,
s_comment
from
part,
partsupp,
supplier,
nation,
... |
<filename>forena/sql/alertajoven/ProgramsByProvider.sql<gh_stars>1-10
-- ACCESS=access content
SELECT pp.entity_id, pnamename.field_programname_name_value FROM bitnami_drupal7.field_data_field_programname_name pnamename
JOIN bitnami_drupal7.field_data_field_program_name pname on pname.field_program_name_target_id=pname... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.