sql stringlengths 6 1.05M |
|---|
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 07, 2016 at 08:44 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<filename>Portal/Binaries/Database/Procedures/MCCandidate_Del.create.sql
-- Procedure MCCandidate_Del
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.MCCandidate_Del
(
@Id int
)
AS
SET NOCOUNT ON
IF(@Id > 0)
DELETE FROM MCCandidate
WHERE Id=@Id;
RETURN
GO
SET ANSI_NULLS ON
GO
SET Q... |
<filename>server/conf/db/migration/default/V180__add_cell_info.sql
insert into cell_info values
(46, 1, 1, 'A', true, false),
(46, 1, 2, 'B', true, false),
(46, 1, 3, 'C', false, false),
(46, 1, 4, 'D', false, false),
(46, 1, 5, 'E', false, false),
(46, 1, 6, 'F', false, false),
(46, 1, 7, 'G', false, fa... |
<reponame>tushartushar/dbSmellsData
select column_name from information_schema.columns where table_name = '$table'
CREATE INDEX main_project_index on "main
CREATE TABLE sessions (sess_id VARCHAR(128) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)
create table '.$this->wrapTable($blueprint)
CREATE INDEX main_private_in... |
<filename>data/gomage.sql
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2017-04-18 16:23:45
-- 服务器版本: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
<gh_stars>1-10
create or replace package body mt_apex_save_scroll
as
subtype t_max_vc2 is varchar2(32767);
function render
(
p_dynamic_action in apex_plugin.t_dynamic_action
, p_plugin in apex_plugin.t_plugin
)
return apex_plugin.t_dynamic_action_render_result
as
c_action ... |
--through which channel was the ratio of promo vs non-promo items sold highest for a given year.
CREATE OR REPLACE FUNCTION promoVsNoPromoItems(givenYear INT)
RETURNS TEXT AS
$$
DECLARE
promoCountWeb INT8;
noPromoCountWeb INT8;
promoCountCatalog INT8;
noPromoCountCatalog INT8;
promoCount... |
/*
Warnings:
- Added the required column `updatedAt` to the `Block` table without a default value. This is not possible if the table is not empty.
- Added the required column `updatedAt` to the `Condominium` table without a default value. This is not possible if the table is not empty.
- Added the required col... |
<gh_stars>10-100
-- file:rolenames.sql ln:150 expect:false
ALTER ROLE CURRENT_ROLE SET application_name to 'BAZ'
|
<filename>Functions/dbo.fn_SHR_GBL_HTMLEncode.sql<gh_stars>1-10
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE FUNCTION [dbo].[fn_SHR_GBL_HTMLEncode](
@strEncode nvarchar(max)
)
RETURNS nvarchar(max) WITH EXECUTE AS CALLER
AS
BEGIN
DECLARE @returnStr nvarchar(max)
RETURN Replace(
Replace(
Replace... |
<filename>Migrations/Cats.DatabaseSchema/dbo/_Tables/Dispatch.sql
CREATE TABLE [dbo].[Dispatch] (
[DispatchID] UNIQUEIDENTIFIER CONSTRAINT [DF_Dispatch_DispatchID] DEFAULT (newsequentialid()) ROWGUIDCOL NOT NULL,
[PartitionID] INT NOT NULL,
[HubID] ... |
<gh_stars>1-10
-- Name: FilesVisibilityByActivity
-- Schema: posda_files
-- Columns: ['file_id', 'visibility']
-- Args: ['activity_id']
-- Tags: ['activity_timepoints']
-- Description: Get files with visibility in latest timepoint of activity
--
select
distinct file_id, visibility
from
activity_timepoint_file natur... |
<reponame>kuro-channel/knowledge-1
SELECT * FROM SYSTEM_ATTRIBUTES
WHERE DELETE_FLAG = 0
ORDER BY INSERT_DATETIME %s
LIMIT ? OFFSET ?;
|
<reponame>cmarincia/tidb
CREATE TABLE `escape` (
`a` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
`b` varchar(13) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
<reponame>DenisKolodin/tari
PRAGMA foreign_keys=off;
ALTER TABLE completed_transactions RENAME TO completed_transactions_old;
CREATE TABLE completed_transactions (
tx_id INTEGER PRIMARY KEY NOT NULL,
source_public_key BLOB NOT NULL,
... |
<gh_stars>1-10
BEGIN;
SELECT id INTO TEMP tmp_streams FROM stream WHERE end_timestamp < (EXTRACt(EPOCH FROM NOW()) - @olderThan@) * 1000;
SELECT id INTO TEMP tmp_packets FROM packet WHERE stream_id IN (SELECT id FROM tmp_streams);
WITH
tmp AS (DELETE FROM packet_matches WHERE packet_id IN (SELECT id FROM tmp_packets... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/forward/Opengauss_Function_Keyword_Forward_Case0025.sql
-- @testpoint:opengauss关键字forward(非保留),作为角色名
--关键字不带引号-成功
drop role if exists forward;
create role forward with password '<PASSWORD>' valid until '2020-12-31';
drop role forward;
--关键字带双引号... |
<gh_stars>0
-- @testpoint:添加cascade参数,删除函数,函数体返回依赖表
--建表
DROP TABLE IF EXISTS sales3;
create table sales3(itemno integer,quantity integer,price numeric);
insert into sales3 values (100,15,11.2),(101,22,12.3);
select * from sales3;
--创建函数,使用RETURNS TABLE子句
DROP FUNCTION if EXISTS extended_sales3(p_itemno IN integer);
... |
<filename>schema.sql<gh_stars>0
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE department(
id INTEGER AUTO_INCREMENT,
name VARCHAR(30),
PRIMARY KEY (id)
);
CREATE TABLE role(
id INTEGER AUTO_INCREMENT,
title VARCHAR(30),
salary DECIMAL(10,2),
department_i... |
<filename>Practice/SQL/BasicSelect/WeatherObservationStation5-mysql.sql
select CITY , length(CITY)
from STATION
order by length(CITY), CITY
LIMIT 1;
select CITY , length(CITY)
from STATION
order by length(CITY) desc , CITY
LIMIT 1; |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- 생성 시간: 17-09-18 07:17
-- 서버 버전: 5.6.36
-- PHP 버전: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
<filename>homestead.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 05, 2017 at 12:51 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.0.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 25, 2022 at 05:41 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 7.4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<gh_stars>0
-- ST_Distance_Sphere polyfill for MariaDB
DROP FUNCTION IF EXISTS `ST_Distance_Sphere_pf`;
DELIMITER //
CREATE FUNCTION `ST_Distance_Sphere_pf`(`pt1` POINT, `pt2` POINT) RETURNS decimal(10,2)
BEGIN
DECLARE degToRad DOUBLE;
DECLARE earthRadiusMean MEDIUMINT;
DECLARE diffY DOUBLE;
DECLARE dif... |
<filename>MCA/4th Sem/Programs/ORACLE/pACKAGE/firstpack_body.sql<gh_stars>0
--A package body containing a stored procedure and function for finding the smallest of three numbers
create or replace package body firstpackage is
procedure smallest_3nos(a number,b number,c number) is
begin
if a<b and a<c then
... |
<filename>database/estrutura.sql
CREATE TABLE usuarios(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(255) NOT NULL UNIQUE,
senha VARCHAR(255) NOT NULL,
nome VARCHAR(255) NOT NULL,
data_nascimento DATE NOT NULL,
rg VARCHAR(255) NOT NULL,
cpf VARCHAR(255) NOT NULL UNIQUE,
tipo... |
SELECT TOP(10) c.Id, c.Name, c.CountryCode, COUNT(*) AS accounts
FROM Accounts AS a
JOIN Cities AS c ON a.CityId = c.Id
GROUP BY c.Id, c.Name,c.CountryCode
ORDER BY accounts DESC
|
<reponame>AlexDeSaran/Curso-SQL-SoftBlue
CREATE DEFINER=`root`@`localhost` PROCEDURE `Limpa_Pedidos`()
BEGIN
SET SQL_SAFE_UPDATES = 0;
DELETE FROM pedidos WHERE pago ='Não';
END |
<reponame>smola/language-dataset
-- Create function for month difference. Can be refined.
drop function months_between;
create function months_between(start_date timestamp, end_date timestamp) RETURNS mb integer
language SQLSCRIPT READS SQL DATA AS
begin
mb := (year(:end_date) - year(:start_date))*12 + (month(:end... |
<filename>src/test/resources/sql/_unknown/67a10018.sql
-- file:plpgsql.sql ln:2327 expect:false
raise notice ' for _i in 1..10 loop
begin
continue when _i < 5
|
sp_configure
go
sp_configure 'max server memory', 4096
go
sp_configure 'max degree of parallelism', 1
go
reconfigure
go
sp_configure 'max degree of parallelism', 0
go
reconfigure
go
|
# 创建数据库
create database father;
# 切换数据库
use father;
# 表情
create table emoji
(
id int auto_increment
primary key,
url varchar(4096) null,
name varchar(512) null,
userId int default 0 not null commen... |
<reponame>dram/metasfresh
-- 2018-02-19T14:26:33.179
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,WEBUI_NameB... |
-- 28.09.2015 15:22
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,543637,0,TO_TIMESTAMP('2015-09-28 15:22:37','YYYY-MM-DD HH24:MI:SS'),0,'de.metas.ban... |
<reponame>dram/metasfresh
-- 2017-05-24T22:46:27.160
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,186,540216,TO_TIMESTAMP('2017-05-24 22:46:27','YYYY-MM-... |
<gh_stars>0
USE NextBusDisplay
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/********************************************************************************
** vw_PlatformOverride - Add Stop Characteristics To The Platform Override Table
**************************************************************************... |
-- Copyright (c) 2013, 2015 Sacred Scripture Foundation.
-- "All scripture is given by inspiration of God, and is profitable for
-- doctrine, for reproof, for correction, for instruction in righteousness:
-- That the man of God may be perfect, throughly furnished unto all good
-- works." (2 Tim 3:16-17)
--
-- Lic... |
update user_login
set name = null
where login !~ 'gmail'
and login !~ '.ru';
alter table user_login
drop constraint if exists user_login_player_id_fk;
alter table user_login
drop column if exists player;
alter table character
drop constraint if exists character_player_id_fk;
alter table character
dr... |
CREATE DATABASE IF NOT EXISTS `weiphp` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `weiphp`;
-- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: weiphp
-- ------------------------------------------------------
-- Server version 5.6.24
/*!40101 SET @OLD_CHARACTER_SET_C... |
/* This file must be idempotent - it is run on each db upgrade */
CREATE TABLE IF NOT EXISTS __T__JQM_SEQUENCE
(
name VARCHAR(50) NOT NULL UNIQUE PRIMARY KEY,
next INTEGER NOT NULL
);
INSERT IGNORE INTO __T__JQM_SEQUENCE(NAME, NEXT) VALUES ('MAIN', 1);
DROP FUNCTION IF EXISTS NEXTVAL;
|
DROP TABLE IF EXISTS P;
DROP TABLE IF EXISTS Q;
DROP TABLE IF EXISTS R;
CREATE TABLE P(x INT, y INT);
CREATE TABLE Q(x INT);
CREATE TABLE R(y INT);
COPY P FROM '/home/rcsql/nf/enf3/p.csv' WITH (FORMAT csv);
COPY Q FROM '/home/rcsql/nf/enf3/q.csv' WITH (FORMAT csv);
COPY R FROM '/home/rcsql/nf/enf3/r.csv' WITH (FORMAT... |
<filename>_Includes/Sitengine/Blog/Schema.sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 25, 2008 at 11:19 AM
-- Server version: 5.0.51
-- PHP Version: 5.2.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `pantichrist2008`
-... |
-- @testpoint:opengauss关键字desc(保留),作为函数名
--关键字不带引号-失败
drop function if exists desc;
create function desc(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--关键字带双引号-成功
drop function if exists "desc";
create function "desc"(i integer)
returns integer
as $$
begin
return i+1;
end;
$... |
<gh_stars>0
/*
SQLyog Ultimate - MySQL GUI v8.2
MySQL - 5.1.40-community : Database - toxqwe12223
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 16-Ago-2018 às 03:40
-- Versão do servidor: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
DROP TABLE IF EXISTS `user_session`;
CREATE TABLE `user_session` (
`user_session_id` mediumint(8) unsigned NOT NULL auto_increment,
`user_id` mediumint(8) unsigned NOT NULL,
`last_modified` datetime NOT NULL,
`session_token` varchar(50) NOT NULL,
`user_session_value` text NOT NULL,
PRIMARY KEY (`user... |
select * from cursos
where nome like 'ph%p_';
select distinct nacionalidade from gafanhotos
order by nacionalidade;
select count(*) from cursos where carga > 40;
select max(totaulas) from cursos where ano = '2016';
select nome, min(totaulas) from cursos where ano = '2016';
select sum(totaulas) from cursos where ano... |
CREATE TABLE `system_users` (
`id` int(10) UNSIGNED NOT NULL,
`first_name` varchar(200) NOT NULL,
`last_name` varchar(200) NOT NULL,
`username` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(200) NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` times... |
<filename>spanglish/Spanglish.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Sep 23, 2021 at 07:12 PM
-- Server version: 8.0.21
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
DROP TABLE IF EXISTS trade; |
<filename>sql/reports/queries/genre_popularity.sql
-- Select most popular genres among users (rented or purchased)
WITH u_m AS (
-- Query total rented and purchased movies as (user_id, movie_id) unioned
SELECT users.id AS user_id, purchases.movie_id
FROM users
INNER JOIN purchases ON purchases.user_id = users.id
... |
<reponame>threecgreen/vinoteca
-- Insert colors
INSERT INTO colors (id, name)
VALUES (1, 'red') ON CONFLICT DO NOTHING;
INSERT INTO colors (id, name)
VALUES (2, 'white') ON CONFLICT DO NOTHING;
INSERT INTO colors (id, name)
VALUES (3, 'rosé') ON CONFLICT DO NOTHING;
INSERT INTO colors (id, name)
VALUES (4, 'dessert') O... |
<gh_stars>0
CREATE TABLE role(
id bigint NOT NULL,
name varchar(40) NOT NULL,
PRIMARY KEY (id)
)
INSERT INTO role VALUES (3, 'ADMIN');
INSERT INTO role VALUES (4, 'USER'); |
<filename>distributions/distribution-1/queries/flat-reward.sql
DECLARE CutoffDate DEFAULT TIMESTAMP("2021-04-13 12:50:00+00");
# Snapshot for the safe ownership, use the block of the CutoffDate
DECLARE CutoffBlock DEFAULT 12231841;
DECLARE TimeThreshold DEFAULT 604800; # One week
DECLARE Reward DEFAULT 1;
WITH modify... |
VACUUM ANALYZE wifdemo.uaz_demonstration;
--deletefrom information
DELETE FROM wifmodel.factortyperating;
DELETE FROM wifmodel.factorimportance;
DELETE FROM wifmodel.suitabilityrules_allocationlu;
DELETE FROM wifmodel.suitabilityrules;
DELETE FROM wifmodel.factortype;
DELETE FROM wifmodel.factor;
DELETE FROM wifmodel.... |
<reponame>lucaleone/University-Roma-Tre-tests-and-exams
set search_path to "esame2013";
--in SQL: i progetti a cui lavora un solo impiegato, mostrandone il codice
create view imp1prog as
select impiegato, progetto
from partecip
where progetto <> all(
select p1.progetto
from partecip as p1, partecip as p2
where p1... |
<gh_stars>1-10
alter table orders_search_view add column shipping_method jsonb not null default '{}';
create or replace function update_orders_view_from_shipment_methods_fn() returns trigger as $$
begin
update orders_search_view set
shipping_method = subquery.shipping_method
from (
se... |
DROP TABLE events;
DROP TYPE event_status;
|
ALTER TABLE `users` ADD `tgstatus` ENUM('active','deactive','spam','bot','block','unreachable','unknown','filter') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; |
-- file:polymorphism.sql ln:700 expect:true
select * from dfunc('Hello World', 20, '2009-07-25'::date)
|
<gh_stars>1-10
INSERT INTO `command` VALUES('lookupitemset',3,'Syntax: .lookupitemset $itemname\r\n\r\nLooks up an item set by $itemname, and returns all matches with their Item set ID\'s.');
|
/*
Table: Users
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| id | int |
| name | varchar |
+---------------+---------+
id is the primary key for this table.
name is the name of the user.
Table: Rides
+---------------+---------+
| Column Name | Type ... |
CREATE PROCEDURE [dbo].[iudLogErrorInfo]
@Error_Line INT,
@Error_Message VARCHAR(5000),
@Error_Number INT,
@Error_Procedure VARCHAR(300),
@Error_Severity INT,
@Error_State INT
AS
BEGIN
INSERT INTO ExceptionLog(ErrorLine, ErrorMessage, ErrorNumber, ErrorProcedure, ErrorSeverity, ErrorState, DateErrorRaised)... |
-- ===================================================================
-- Copyright (C) 2011-2012 <NAME> <<EMAIL>>
-- Copyright (C) 2011-2012 <NAME> <<EMAIL>>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the... |
<filename>src/main/resources/db/migration/V3__Rename_license_keys.sql
update license set NAME = 'cc-by-4.0' where name = 'cc by 4.0';
update license set NAME = 'cc-by-sa-4.0' where name = 'cc by-sa 4.0';
update license set NAME = 'cc-by-nd-4.0' where name = 'cc by-nd 4.0';
|
create table TAB_PARTITION_RANGE_LIST ( COL1 NUMBER(15) not null, COL2 NUMBER(15) not null, COL3 NUMBER(15) not null ) partition by range (COL1,COL2) subpartition by list (COL3)(partition part_10_5 values less than (10,5)(subpartition part_10_5__3_4 values (3,4),subpartition part_10_5__5_7 values (5,7),subpartition... |
/*
Navicat MySQL Data Transfer
Source Host : localhost:3306
Source Database : team
Target Host : localhost:3306
Target Database : team
Date: 2019-04-03 11:02:37
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for db_active_stu
-- ----------------------------
DROP TA... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Dim 07 Janvier 2018 à 14:12
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
CREATE DATABASE `ZHIHUHOT_FULL_DATA` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
CREATE TABLE `QUESTION` (
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`TOPIC_URL` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
`NAME` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
`LINK_ID` int(10) unsign... |
<filename>C#DbFundamentals/C#DB Basics/Basic CRUD/12. Find All Employees with Salary More Than.sql
SELECT FirstName,LastName, Salary FROM Employees WHERE Salary>50000 ORDER BY Salary DESC |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Gegenereerd op: 24 mrt 2017 om 11:37
-- Serverversie: 10.1.10-MariaDB
-- PHP-versie: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
CREATE ROLE [Great Lakes Sales]
AUTHORIZATION [dbo]
GO
|
--
-- The MIT License
-- Copyright © 2016 <NAME>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, me... |
<reponame>KevinD-QA/Hobby-Project
INSERT INTO `Heroes` (`heroName`, `Element`, `Weapon`,`Levels`) VALUES ('Zhongli', 'Geo', 'Polearm', 90); |
SELECT
c.id,
CONCAT(c.first_name, ' ', c.last_name) AS 'full_name'
FROM colonists AS c
JOIN travel_cards AS tc
ON c.id = tc.colonist_id
WHERE job_during_journey = 'Pilot'
ORDER BY c.id ASC; |
<filename>document/Database/db-kgexchange-2018-16-Feb.sql
/*
SQLyog Ultimate v8.55
MySQL - 5.6.17 : Database - khexchange
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECK... |
<reponame>abelpacara/disloques
-- phpMyAdmin SQL Dump
-- version 4.5.4.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 31, 2016 at 12:08 AM
-- Server version: 5.5.47-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40... |
<filename>mysql-sql/M_ARTICLE.sql
CREATE TABLE `m_article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`title` varchar(100) DEFAULT NULL,
`description` text,
`publish_flg` char(1) NOT NULL DEFAULT '0',
`publish_date` timestamp NULL DEFAULT NULL,
`access_cnt` int(11) NOT NULL DE... |
<reponame>rowanuniversity/profpy<filename>profpy/cli/flask_init/files/cli.db_user.ddl.sql<gh_stars>1-10
DECLARE
userexists integer;
BEGIN
SELECT CAST(COUNT(*) AS INTEGER) INTO userexists FROM dba_users WHERE username='{database_user}';
if (userexists = 0) then
execute immediate 'CREATE USER {databas... |
SELECT
boot_time
FROM uptimes
WHERE boot_time >= 'SYNCSTART'
|
SELECT 56
FROM {{ foo.schema }}.{{ foo.table("xyz") }}
WHERE {{ foo.bar.baz.equals("x", 23) }} and {{ root_equals("y", 42) }}
|
<gh_stars>1-10
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: katiplertr_db
-- ------------------------------------------------------
-- Server version 10.1.38-MariaDB-cll-lve
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARAC... |
<filename>MP_MODSPACK/Mods/Historical Religions Complete (BNW or GK) (v 45)/SQL/HistoricalReligionsMasterPreference.sql
--==========================================================================================================================
-- Vanilla
--==============================================================... |
<reponame>wolftuo/EasyEE
/*
SQLyog Enterprise v12.09 (64 bit)
MySQL - 5.7.10 : Database - easyee
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 S... |
-- file:groupingsets.sql ln:267 expect:true
select sum(ten) from onek group by rollup(four::text), two order by 1
|
<gh_stars>1-10
prompt --application/shared_components/navigation/lists/desktop_navigation_menu
begin
-- Manifest
-- LIST: Desktop Navigation Menu
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.03.31'
,p_release=>'20.1.0.00.13'
,p_default_workspace_id=>2400405578329584
,p_default_app... |
<gh_stars>0
/* ownership_conflict.sql
Copyright (C) 2013 <NAME>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any lat... |
ALTER TABLE PatientDelivery ALTER COLUMN DeliveryComplicationsExperienced INT NULL |
<filename>sql/V004__AddEmployeePositionView.sql<gh_stars>0
-- V004__EmployeePositionView.sql
CREATE VIEW EmployeePositions AS
SELECT Employees.LastName, Titles.Title
FROM Employees
LEFT JOIN Titles ON Employees.TitleId=Titles.Id |
TRUNCATE TABLE airlines;
INSERT INTO `airlines` (id, icao, name, callsign) VALUES
(1, 'ABD', 'Air Atlanta Icelandic', 'Atlanta'),
(2, 'ABB', 'Air Belgium', 'Air Belgium'),
(3, 'AAR', 'Asiana Airlines', 'Asiana'),
(4, 'AAL', 'American Airlines', 'American'),
(5, 'AAH', 'Aloha Airlines', 'Aloha'),
(6, 'AAG', 'Air Atlanti... |
\c tqos_database
-- Switch to the tq_admin user to drop the database for TQ objects.
SET ROLE tq_admin;
DROP SCHEMA tqos_asr CASCADE;
SET ROLE postgres;
\c postgres
-- Switch to the tq_admin user to drop the database for TQ objects.
SET ROLE tq_admin;
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat... |
<reponame>wangli5676792/wxcopy2.0
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50614
Source Host : 127.0.0.1:3306
Source Database : thinkgrab
Target Server Type : MYSQL
Target Server Version : 50614
File Encoding : 65001
Date: 2019-11-16 17:... |
<gh_stars>0
SELECT area_id,
AVG(compensation_from) compensation_from_avg,
AVG(compensation_to) compensation_to_avg,
AVG((compensation_to + compensation_from) / 2) compensation_to_compensation_from_avg
FROM vacancy
GROUP BY area_id; |
<filename>sql/2.0-to-2.1.sql
/**--------------------------------------------------------
* Module Name : RunTimeAppliance
* Version : 2.0.0
*
* Software Name : OpenSourceAppliance
* Version : 2.1
*
* Copyright (c) 2012 – 2013 France Télécom
* This software is distributed under the Apache 2 license
* <http://www.apache.... |
<filename>postgres/verify/user_insert_duplicate.sql
-- Verify user_insert_duplicate
BEGIN;
SELECT goiardi.merge_users('foom', 'foom', '', false, 'asdfas', '', NULL, 1);
SELECT id, name FROM goiardi.users WHERE name = 'foom' AND admin = FALSE;
SELECT goiardi.merge_users('foom', 'foom', '', true, 'asdfas', '', NULL, 1)... |
ALTER TABLE externaltool
ADD COLUMN IF NOT EXISTS toolname VARCHAR(255);
|
ALTER TABLE {$NAMESPACE}_phortune.phortune_product
DROP productType;
|
-- Database: hsqldb
-- Change Parameter: columns=[column:[
-- name="id"
-- type="int"
-- ], ]
-- Change Parameter: file=com/example/users.csv
-- Change Parameter: primaryKey=pk_id
-- Change Parameter: tableName=person
MERGE INTO person USING (VALUES (1)) ON pk_id = NULL WHEN NOT MATCHED THEN INSERT (username, f... |
DROP TABLE IF EXISTS one;
CREATE TABLE one(dummy UInt8) ENGINE = Memory;
SELECT database, t.name
FROM system.tables AS t
ALL INNER JOIN (SELECT name AS database FROM system.databases) AS db USING database
WHERE database = 'system' AND t.name = 'one'
FORMAT PrettyCompactNoEscapes;
SELECT database, t.na... |
<reponame>tichimura/yugabyte-db
BEGIN;
CREATE TABLE IF NOT EXISTS pg_catalog.pg_yb_catalog_version (
db_oid oid NOT NULL,
current_version bigint NOT NULL,
last_breaking_version bigint NOT NULL,
CONSTRAINT pg_yb_catalog_version_db_oid_index PRIMARY KEY (db_oid ASC)
WITH (t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.