blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
30a175831ef67e62023c023e65387ffaa1d8dea0 | SQL | Waynee-jiang/car-spider3 | /car-spider.sql | UTF-8 | 3,422 | 3.1875 | 3 | [] | no_license |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for car_brand_temp
-- ----------------------------
DROP TABLE IF EXISTS `car_brand_temp`;
CREATE TABLE `car_brand_temp` (
`id` int(8) NOT NULL,
`letter` varchar(2) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`imgurl` varchar(255... | true |
764a768783435eb9dac50b33f2c6342a5ade3c19 | SQL | GreeshmaShaji19/grittransactions | /root123.sql | UTF-8 | 1,760 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 21, 2021 at 04:26 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
2caa163e37945858360395779f7359e5e306613f | SQL | simontkuntz/bassoon | /ps16a.sql | UTF-8 | 197 | 3.140625 | 3 | [] | no_license | CREATE TABLE cardholder(
card_number NUMBER primary key, customer_id NUMBER, credit_limit NUMBER,
constraint fk_customer_id foreign key(customer_id)
REFERENCES temp_table_customers(customer_id)
);
| true |
beb81a50b77ed6aa02e4c20d92aa80348f75a63d | SQL | MBing/PHPit1 | /MySQL boek/tennisvereniging.sql | UTF-8 | 1,894 | 3.609375 | 4 | [] | no_license | # SQL voor MySQL ontwikkelaars voorbeeld db:
CREATE DATABASE tennisvereniging;
USE tennisvereniging;
CREATE TABLE spelers (
spelersnr INT UNSIGNED,
naam VARCHAR(50),
voorletters VARCHAR(10),
geb_datum DATE,
geslacht ENUM ('M','V') DEFAULT 'M',
jaartoe TIMESTAMP,
straat VARCHAR(50),
huisnr VARCHAR(10),
postcode VARCHAR(... | true |
93a53041c563305e8c84ed94c09f712a42e649f0 | SQL | guillaumesoul/SevigneMiroir | /migrations/2017-05-03-fos-user-init.sql | UTF-8 | 1,102 | 3.328125 | 3 | [] | no_license | CREATE SEQUENCE fos_user_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE TABLE fos_user (id INT NOT NULL, PRIMARY KEY(id));
ALTER TABLE fos_user ADD username VARCHAR(180) NOT NULL;
ALTER TABLE fos_user ADD username_canonical VARCHAR(180) NOT NULL;
ALTER TABLE fos_user ADD email VARCHAR(180) NOT NULL;
ALTER TABLE fos_... | true |
3544eeb4c7e39e694121321f979b13645f3c075d | SQL | gurpreet19/ec198392_wht | /Database/06_CVX_template/01_RP_Packages/RPDP_REVN_UNIT.sql | UTF-8 | 6,896 | 2.828125 | 3 | [] | no_license |
-- START PKG_GEN_PKGS.sf_get_functions at:05/07/2019 11.46.28 AM
CREATE or REPLACE PACKAGE RPDP_REVN_UNIT
IS
FUNCTION GETPRICINGCURRENCYIDIFUNIQUE(
P_DOCUMENT_KEY IN VARCHAR2)
RETURN VARCHAR2;
FUNCTION CONVERTVALUE(
P_INPUT_VAL IN NUMBER,
P_FROM_UNIT IN VARCHAR2,
P_... | true |
3aefbc09d5823d038890f034701759ad63ee430c | SQL | rockwell421/mysql-workshop-2 | /exercise-n.sql | UTF-8 | 8,817 | 3.28125 | 3 | [] | no_license | ### Exercise 1
SOURCE data/import-table-structure.sql
### Exercise 2
INSERT INTO Account (email, password, createdOn, modifiedOn)
VALUES ('eddy@xcap.ca','shenanigans','2017-04-05','2017-04-09');
INSERT INTO AddressBook (accountId, name, createdOn, modifiedOn)
VALUES (21245678901,'Patty O\Shen... | true |
ec7ff3dc63db740cddbd15166689ee217a66cbe1 | SQL | Merces-dev/AulaDML0408 | /03_DML.sql | ISO-8859-1 | 697 | 3.046875 | 3 | [] | no_license | -- INSERT - Inserir
INSERT INTO Estilo(Nome) VALUES ('Hip Hop');
INSERT INTO Usuario(Nome,Permissao,Senha,Email) VALUES ('Giovani', 1, '12345', 'giovani@gmail.com');
INSERT INTO Artista(IdEstilo,Nome) VALUES (1,'Post Malone');
INSERT INTO Album(IdArtista, Nome, DataLancamento, Localizacao, QtdMinutos, Ativo) VALUES (1,... | true |
83d701c66654c7c349e071400ccafbb20f244705 | SQL | Xandowski/learning_plsql | /assignment_02_class_04.sql | UTF-8 | 629 | 3.21875 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION primeiro_nome_func
RETURN VARCHAR(20);
IS
emp_name VARCHAR(20);
BEGIN
SELECT primeiro_nome INTO emp_name
FROM funcionarios_tbl
WHERE ID=90;
RETURN emp_name;
END;
DECLARE
a number(3) := 100;
BEGIN
IF ( a = 10 ) THEN
dbms_output.put_line('Value of a is... | true |
2e5b20a958a725efa5c3ca0b0261040722329ba4 | SQL | hsosik/ifcb-analysis | /analyze_by_class/queryBinList_onetimeseries.sql | UTF-8 | 160 | 2.90625 | 3 | [
"MIT"
] | permissive | SELECT bin FROM classify_classification
where cast(timeseries_id as uuid)=(select id from classify_timeseries where url like '%%%s/')
GROUP BY bin ORDER BY bin; | true |
70840ab068156d4dde6a70ca639facf9b8653b9e | SQL | ALFTavares/MySQL-Exercises-FinalProject | /Loja.sql | UTF-8 | 13,223 | 4.28125 | 4 | [] | no_license | DROP DATABASE IF EXISTS LOJA_EM_LINHA;
CREATE DATABASE LOJA_EM_LINHA;
USE LOJA_EM_LINHA;
DROP TABLE IF EXISTS PRODUTO;
CREATE TABLE PRODUTO(
ID VARCHAR(10) PRIMARY KEY,
Quantidade INTEGER UNSIGNED NOT NULL,
Preco DECIMAL(8, 2) UNSIGNED NOT NULL,
IVA REAL UNSIGNED NOT NULL
);
DROP TABLE IF EXISTS FOR... | true |
a8adf2286eff3e02d071538789dc7cc443b46280 | SQL | strictShu/mt-store-app-parent | /mt-store-data/src/main/resources/sql/ta_area.sql | UTF-8 | 11,782 | 2.890625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : mt-store
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 23/07/2020 0... | true |
53d6777c1b869b9476813c328e12671624e0eddf | SQL | douit/cqes_dev | /重庆二师_Dev/dw_mpp/table/fdm/edu_hb_gxjzgly.sql | UTF-8 | 3,027 | 2.875 | 3 | [] | no_license | /*
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: song.shengjie@h3c.com
# COMPANY: h3c.bigdata
# VERSION: 1.0
# CREATED: 2017/08/07
# REVIEWER:
# REVISION: ---
*/
set names utf8;
use FDM;
DROP TABLE IF EXISTS `edu_hb_gxjzgly`;
CR... | true |
4ce32b30a6de0f606a4a866af42b407dcbdd9cbc | SQL | dtripathy10/java-poc | /hibernate/src/main/resources/sql/ddl.sql | UTF-8 | 516 | 3.4375 | 3 | [] | no_license | -- utitlity
SHOW DATABASES; -- show list of databases
select version(); -- show version of mysql server
SELECT User FROM mysql.user; -- see list of users
DROP TABLE IF EXISTS `stock`;
CREATE TABLE `stock` (
`STOCK_ID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`STOCK_CODE` VARCHAR(10) NOT NULL,
`STOCK_NAME` VARC... | true |
71d07e84a471f95656c738593ea3f2f465809064 | SQL | Samuel-Guo/QuestTag | /eduout.sql | UTF-8 | 4,672 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: edu
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... | true |
348ab135ffca83dc24825a02ab45cd7683be594d | SQL | dat-leth/ltw-bayern-infosys | /src/database/VIEW_StimmenProParteiStimmkreis.sql | UTF-8 | 1,680 | 3.484375 | 3 | [] | no_license | CREATE VIEW w.StimmenProParteiStimmkreis(landtagswahl, partei, stimmkreis, zweitstimmen, erststimmen) AS
WITH ZweitstimmenProPartei(landtagswahl, partei, stimmkreis, anzahl) AS (
SELECT s.landtagswahl, k.partei, s.stimmkreis, SUM(s.anzahl)
FROM w.ZweitstimmenProKandidatStimmkreis s
... | true |
03a6f5de227eb3aaa53d99a10bf2f44c54dcaa17 | SQL | conglinhrocket13/Rocket13 | /SQL/testing_System_Assignment/Testing_System_Assignment_4.sql | UTF-8 | 5,569 | 4.25 | 4 | [] | no_license | use testing_system_assignment_1;
-- Question 1: Viết lệnh để lấy ra danh sách nhân viên và thông tin phòng ban của họ
SELECT a.*,d.DepartmentName
FROM `account` a
JOIN department d ON a.DepartmentID = d.DepartmentID;
-- Question 2: Viết lệnh để lấy ra thông tin các account được tạo sau ngày 20/12/2010
SEL... | true |
6d79db1699de15ac9dcf1b240fe1922191d662fa | SQL | lverer23333/CodeSmellDetection | /bin/database/relations.sql | UTF-8 | 784 | 2.609375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50727
Source Host : localhost:3306
Source Database : testdata666
Target Server Type : MYSQL
Target Server Version : 50727
File Encoding : 65001
Date: 2019-09-04 17:29:02
*/
SET FOREIGN_KEY_CHECKS... | true |
e035f8a941ce3a892cb39a137afea2d797c5a8e4 | SQL | erinaldo/SlaughterHousePro | /SlaughterHouseServer/Database/Dump20191025/slaughterhouse_transport_item.sql | UTF-8 | 3,336 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: 203.150.243.47 Database: slaughterhouse
-- ------------------------------------------------------
-- Server version 5.7.28
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... | true |
0b33abd080b7f8def80d50107fccc8d05c380379 | SQL | iuthub/lab-7-Sarvinoz | /sql/imdb_queries.sql | UTF-8 | 1,802 | 3.640625 | 4 | [] | no_license | 1.
SELECT name
FROM movies
WHERE year = 1995
2.
SELECT COUNT( * ) as "Number of people played a part"
FROM movies m
JOIN roles r ON r.movie_id = m.id
JOIN movies_directors md ON md.movie_id = m.id
JOIN actors a ON a.id = r.actor_id
JOIN directors d ON ... | true |
76afa1ade123f2c30a041c2164c0ec0c20eeb56b | SQL | azizxonImomnazarov/department | /src/main/resources/sql/tables/create_tables.sql | UTF-8 | 825 | 3.515625 | 4 | [] | no_license | DROP TABLE IF EXISTS snp_employee;
DROP TABLE IF EXISTS snp_department;
DROP TABLE IF EXISTS snp_task;
CREATE TABLE snp_department (
department_id SERIAL NOT NULL primary key,
department_name VARCHAR(100) NOT NULL
);
CREATE TABLE snp_employee (
employee_id SERIAL NOT NULL primary key,
employee_na... | true |
cbdcc45ddde25d4a162ec9367e5da9e688e9bcbb | SQL | CzyerChen/boot-shiro-redisson | /src/main/resources/db/init.sql | UTF-8 | 8,347 | 2.8125 | 3 | [] | no_license | -- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`USER_ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`USERNAME` varchar(50) NOT NULL COMMENT '用户名',
`PASSWORD` varchar(128) NOT NULL COMMENT '密码',
`DEPT_ID... | true |
d149030f88fc2ae98d010cc92d6d475fb01e1da7 | SQL | luciacito/TW_WEB_CERT_3 | /db00_q3.sql | UTF-8 | 5,617 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2018-08-15 09:25:07
-- 伺服器版本: 10.1.31-MariaDB
-- PHP 版本: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
33b144e40106ebbf1e40f39c996e695cf5f20c8f | SQL | Good725/ideabubble-lamp | /projects/kilmartin/model/model-20161117111200.sql | UTF-8 | 435 | 2.5625 | 3 | [] | no_license | /*
ts:2016-11-17 11:12:00
*/
INSERT INTO plugin_dashboards
(title, description, columns, date_filter, date_created, date_modified, created_by, modified_by, publish, deleted)
VALUES
('Admin', '', 3, 1, NOW(), NOW(), 1, 1, 1, 0);
INSERT INTO plugin_dashboards_sharing
(dashboard_id, group_id)
(SELECT (select i... | true |
61c2c1b70680a76ef2a90c7e2e3d121e26b8497c | SQL | MAlejandroFlores/phpmotors | /sql/enhancement2.sql | UTF-8 | 988 | 3.296875 | 3 | [] | no_license | -- Query 1 Insert Tony Stak to clients dataBase
INSERT INTO
clients
( clientFirstname, clientLastname, clientEmail, clientPassword, comment)
VALUES
("Tony", "Stark", "tony@starkent.com", "Iam1ronM@n", "I am the real Ironman");
--Query 2 Modify Tony's clientLevel
UPDATE clients SET clientLev... | true |
36347d651e1ea024f70722e589aac4aa6965e2af | SQL | LabKey/onprcEHRModules | /onprc_billing/resources/schemas/dbscripts/sqlserver/oga_AliasCleanup2020.sql | UTF-8 | 3,184 | 3.65625 | 4 | [] | no_license | -- This script will never run as part of an upgrade, but is being archived here
/****** Object: StoredProcedure [onprc_billing].[oga_AliasCleanupNew] Script Date: 1/29/2020 7:13:37 AM ******/
CREATE PROCEDURE [onprc_billing].[oga_AliasCleanup]
AS
BEGIN
--This update will be used to enter date disabled f... | true |
63939e7b5e33a3305dcf0a531845561f76d8ef52 | SQL | VincentAl/switch_newlook | /src/sql/switch_newlook.sql | UTF-8 | 2,957 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 22 Avril 2015 à 08:57
-- Version du serveur : 5.6.15-log
-- Version de PHP : 5.5.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
3727fc6d0514c0344cf4b124df9035131dc8abb3 | SQL | radtek/Oracle-4 | /SQL/Administração/Scripts/repl_pend.sql | ISO-8859-2 | 708 | 2.734375 | 3 | [] | no_license | Prompt -- #############################################################
Prompt -- # #
Prompt -- # Lista Pendencias de Rplica #
Prompt -- # #
Prompt -- #######################... | true |
10052fe05fc644f372e5dbcbbea78a193c067ce3 | SQL | comphca/HiGit | /database/init.sql | UTF-8 | 994 | 3.4375 | 3 | [] | no_license | drop database if exists hotel;
create database hotel;
use hotel;
create table t_user(
id int primary key auto_increment,
loginName varchar(20),
password varchar(20)
)engine=innodb default charset=utf8;
create table t_room_type(
id int primary key auto_increment,
name varchar(20),
price double
)engine=i... | true |
c2075dfffce7f875fa223cc0f080b44615b08200 | SQL | Andrew0914/AlertaCDMX_Servicios | /alertacd_base.sql | UTF-8 | 2,950 | 2.984375 | 3 | [] | no_license | CREATE DATABASE alertacd_base;
USE alertacd_base;
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 31-05-2016 a las 05:09:53
-- Versión del servidor: 5.5.24-log
-- Versión de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00"... | true |
eb77e06f4ec53f24feb127bc438a56312a3d3fb7 | SQL | boyddensmore/Maximo-Oracle-SQL-Public | /Assets/Asset Audit.sql | UTF-8 | 40,777 | 4.03125 | 4 | [] | no_license | /*******************************************************************************
* Data Quality Checks to build
* - Cases where user and custodian orgs differ
* - Assets that shouldn't have CIs but do
* -
* -
* -
*******************************************************************************/
/********************... | true |
340a9156e7355bc09535cf225f2c40cd8a256d93 | SQL | HeroG23/daily | /db/init.sql | UTF-8 | 795 | 3.515625 | 4 | [] | no_license | CREATE TABLE week_user(
user_id SERIAL PRIMARY KEY,
email VARCHAR(40),
username VARCHAR(40),
password VARCHAR(40),
first_name TEXT,
last_name TEXT,
phone_num VARCHAR(20),
current_town, VARCHAR(100),
profile_pic VARCHAR(3000)
);
CREATE TABLE activities(
activity_id SERIAL PRIMARY... | true |
c43932ca4f17770739fba01451b7bd2dd7635f82 | SQL | felipereis12/smarterp | /oic_db/queries/otc_invoice_customer/select_invoice_customer_join_order_to_cash_otc.sql | UTF-8 | 2,976 | 3.40625 | 3 | [] | no_license | select
otc.origin_system,
ivc.identification_financial_responsible,
ivc.full_name,
ivc.adress,
ivc.adress_number,
ivc.adress_complement,
ivc.district,
ivc.city,
ivc.state,
ivc.postal_code,
ivc.nationality_code,
ivc.area_code,
ivc.cellphone,
ivc.email,
ivc.erp_customer_id
from order_to_cash... | true |
7e13dbfc5ee5f4553c37dd1a6eece5bfe6f32911 | SQL | gilguim36/sql | /initial-project.sql | UTF-8 | 938 | 3.859375 | 4 | [] | no_license | /* THE IMPORTANCE OF DATA AND SQL BASICS
Project 1 - Create a Table
In this project, I created a table and add/delete data from it!
Feel free to add more columns, insert more data, and create more tables to train even more. */
CREATE TABLE friends (
id INTEGER,
name TEXT,
birthday DATE
);
INSERT INTO friends (... | true |
d193b1e9f78ed58f9938fa9e5946a70ae8ccd06a | SQL | blikblum/luipack | /luirest/demos/addressbook/dbscripts/firebird.sql | UTF-8 | 2,202 | 4.03125 | 4 | [] | no_license | /****************** GENERATORS ********************/
CREATE GENERATOR GEN_CATEGORIES_ID;
CREATE GENERATOR GEN_CONTACTS_ID;
CREATE GENERATOR GEN_PHONES_ID;
/******************** TABLES **********************/
CREATE TABLE CATEGORIES
(
ID integer NOT NULL,
NAME varchar(300),
CONSTRAINT INTEG_4 PRIMARY KEY (ID)
)... | true |
0910596408a168708d6e92fb41a9c04c66784e42 | SQL | Franklin2759/SpringProject | /ADM Project-EComplaint.sql | UTF-8 | 394 | 2.59375 | 3 | [] | no_license | use ecomplaint;
show tables;
create table complaint(cId int not null auto_increment primary key,
name varchar(40),
acctno long,
compType varchar(40),
description varchar(40),
status varchar(40),
priority varchar(40));
create table user(name varchar(40),
username varchar(40),
password varchar(40),
email varchar(40),
con... | true |
3574b5c09da3b5993bcccca1b6b0ea3d5742f505 | SQL | peach0819/peach | /有用的/需求记录/0、2021年需求/5、订单归属/数仓新的stg层/订单实时归属中间表/dw_trd_order_d修改/dw_itm_pickup_card_d修改.sql | UTF-8 | 1,262 | 3.5625 | 4 | [] | no_license | select gift_coupon_conf.item_id as item_id,
hi_card_template.first_pickup_category_id as pickup_category_id_first,
hi_card_template.second_pickup_category_id as pickup_category_id_second,
hi_card_template.third_pickup_category_id as pickup_category_id_third
from (
select id,... | true |
64d702cb438b5545ef2459ccea1ebe0ce3865d0c | SQL | molokovskikh/af_priceprocessor | /migrations/20101608165920_FarmExcludesCreateLogging.sql | UTF-8 | 2,687 | 3.453125 | 3 | [] | no_license |
CREATE TABLE `logs`.`ExcludeLogs` (
`Id` int unsigned NOT NULL AUTO_INCREMENT,
`LogTime` datetime NOT NULL,
`OperatorName` varchar(50) NOT NULL,
`OperatorHost` varchar(50) NOT NULL,
`Operation` tinyint(3) unsigned NOT NULL,
`ExcludeId` int(10) unsigned not null,
`OriginalSynonymId` int(10) unsig... | true |
9430ce56291f4237a4e9b924072ee8a3e726dbe1 | SQL | kamusone/Heroku-Exemple-kick-start | /Desktop/heroku/flask-heroku-example/schema.sql | UTF-8 | 404 | 2.84375 | 3 | [] | no_license | drop table if exists country;
create table country (
id serial PRIMARY KEY,
name text not null
);
drop table if exists author;
create table author (
id serial PRIMARY KEY,
country_id integer REFERENCES country (id),
name text not null
);
drop table if exists book;
create table book (
id serial PRIMARY KEY... | true |
7c07afeef951da6b5b8b22202c940a95196e4216 | SQL | CSCfi/puppet-opsviewagent | /files/nrpe/find_multiattached_volumes.sql | UTF-8 | 407 | 3.234375 | 3 | [] | no_license | # Prints instances from nova.block_device_mappings table that have multiple mappings
# This is only valid while multi-attach is not supported in the platform.
SELECT my_uuids
FROM
(
SELECT
volume_id AS my_uuids,
count(*) AS VOLUME_COUNT
FROM
nova.block_device_mapping
WHERE
deleted_at IS NULL AND
... | true |
cf315edb5c58288ba011b726d65c5d99247e9696 | SQL | tritanngo99/CSDL | /load_script_Student_course.sql | UTF-8 | 27,605 | 3.046875 | 3 | [] | no_license | create table Student
(STNO SMALLINT PRIMARY KEY NOT NULL,
SNAME NVARCHAR(20) NULL,
MAJOR NVARCHAR(4) NULL,
CLASS SMALLINT NULL,
BDATE SMALLDATETIME NULL)
;
create table Grade_report
(STUDENT_NUMBER SMALLINT NOT NULL,
SECTION_ID SMALLINT NOT NULL,
GRADE CHAR(1)
CONSTRAINT stno_secid PRIMARY KEY (STUDENT_NUMBER, S... | true |
4c215363d0a51266f63dabfc3358a2e545fa5894 | SQL | afoster44/CS-gregslist-webapis | /setup.sql | UTF-8 | 523 | 3.46875 | 3 | [] | no_license | USE gregslistafdb;
-- CREATE TABLE cars
-- (
-- id INT AUTO_INCREMENT,
-- make VARCHAR(255) NOT NULL,
-- model VARCHAR(255) NOT NULL,
-- price DECIMAL(10 , 2) NOT NULL,
-- year INT NOT NULL,
-- PRIMARY KEY (id)
-- );
-- drop table cars;
-- INSERT INTO cars
-- (make, model, price, year)
-- VALUES
-- ("Ch... | true |
f45881a5dab608cf3e111ca127f40a22e60f3cb0 | SQL | ChaojieDZhao/titan | /titan/src/main/java/database/bus/qq_contract.sql | UTF-8 | 1,652 | 2.734375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 本地mysql
Source Server Version : 50718
Source Host : 47.94.158.38:3306
Source Database : lukebang
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-10-20 11:51:28
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
1d5ba90384b9a2f2c3275a2215ecc7115a1bd8a1 | SQL | whlee21/aumc-daily | /cdc_load/sprint_2/itf_death.sql | UTF-8 | 1,655 | 3.59375 | 4 | [] | no_license | /*****************************************************
프로그램명 : ITF_DEATH.sql
작성자 : 원종복
수정자 :
최초 작성일 : 2020-12-07
수정일 :
소스 테이블(기본) : ITF_DEATH(사망증명서 관련 view)
소스 테이블(참조) :
프로그램 설명 : 사망관련 !!!!!!!!!!!!!!! regit_seq 1 인 것만 써야함.!!!!!!!!!!!
cnt :
*****************************************************/
ins... | true |
8f519ba1dcab665b2b017b38bb2d561aa53698fe | SQL | IsmaelHG79/Inovaccion | /network-inventory-development/09_Semantic_Model/sql/DM_Time_Preparation.sql | UTF-8 | 940 | 3.5625 | 4 | [] | no_license | INVALIDATE METADATA
DROP TABLE dm_tiempo_hv;
set hivevar:start_date=2019-01-01;
set hivevar:days=3650;
set hivevar:table_name=dm_tiempo_hv;
set hive.support.sql11.reserved.keywords=false;
CREATE TABLE IF NOT EXISTS ${table_name} AS
WITH dates AS (
SELECT date_add("${start_date}", a.pos) AS `date`
FROM (SELEC... | true |
06f50628bbce51b84def28770b70c269993f2b16 | SQL | themuzic/finalProject | /src/main/java/com/kh/develoffice/script/Develoffice_script_function.sql | UTF-8 | 4,211 | 2.921875 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION FN_KO_CHAR (
i_p1 IN VARCHAR2
)
RETURN VARCHAR2
AS
l_rt VARCHAR2 (4000);
FUNCTION f1 (
i_p1 IN VARCHAR2
)
RETURN VARCHAR2
AS
l_p1 PLS_INTEGER := ASCII (UNISTR (i_p1));
l_i0 PLS_INTEGER := l_p1 - TO_NUMBER ... | true |
3eb75c69b44d496869d8fe270a927c897437a9fc | SQL | msaravinps/NPS-MIMS | /Scripts/MIMS_SearchforCMI.sql | UTF-8 | 301 | 2.53125 | 3 | [] | no_license | Update mims.mims_cmiandrelateddata_singletable_dec_v6 as m6
set m6.ScheduleClassification =
(
SELECT cmi.CMIcode FROM mims.cmixmldata_december as cmi
where cmi.CMIxml like concat( '%<CMIname type="file">', 'Aranesp', '%') and cmi.CMICode = 8704
LIMIT 1
)
WHERE mst.ProdCode = '5910'
| true |
329c33d2145569e9ab6edfa5ced96f2786cb3383 | SQL | Claudiocm/solicitacao | /src/main/resources/db/migration/V01__criar_banco.sql | UTF-8 | 15,204 | 2.859375 | 3 | [] | no_license | CREATE TABLE `cargo` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(60) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_91fcfd99kg1af67rjv08heu1q` (`nome`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `` (`id`,`nome`) VALUES (1,'Analista de Sistem... | true |
d847083623c550536ecbb46db0467aa748b18530 | SQL | flavioso16/case-teste-itau | /renegociacao-produto/src/main/resources/db/migration/V001__criacao_tabelas.sql | UTF-8 | 345 | 2.578125 | 3 | [] | no_license | create table produto (
id_produto bigint not null auto_increment,
nome varchar(100) not null,
tipo varchar(50) not null,
descricao varchar(100) not null,
taxa_anual decimal(5,2) not null,
taxa_mensal decimal(5,2) not null,
valor_multa_atraso decimal(10,2) not null,
taxa_diaria_atraso decimal(5,2) not null,
pri... | true |
1a2f90b4b9b6adb4cd10d1341b8f11e91e031f81 | SQL | JungWonHong/Spring | /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Ajax/_10.dbpost/sql/product.sql | UHC | 325 | 2.625 | 3 | [] | no_license | create table products(
id number(11),
name varchar2(50),
modelnumber varchar2(15),
series varchar2(30)
)
select * from products;
insert into products values(1, 'ڵ', '', 'S2');
insert into products values(2, 'ڵ', '', 'S8');
delete from products where id > 4;
delete from products; | true |
94984420ffc46e26ed2d86608c8b39ffe5dd7a66 | SQL | LucasZs/MySQL_projects | /Third task - queries - demo on 2016.01.18/Queries/subqueries.sql | UTF-8 | 1,846 | 4.53125 | 5 | [] | no_license |
/*SUBQUERIES*/
/*1. Write a query to find the names (first_name, last_name) and salaries of the employees who have higher salary than the employee whose last_name='Bull'*/
select first_name, last_name, salary from employees where salary >= (select salary from employees where last_name='Bull');
/*2. Find the names (f... | true |
9b7625b44da8e08bd8bcfcc1aec0047e2214de99 | SQL | LyubomirVasilev/CSharp-DB-Fundamentals | /Database Basics/Database Programmability and Transactions/Database Programmability and Transactions/02. Employees with Salary Above Number.sql | UTF-8 | 253 | 3.015625 | 3 | [
"MIT"
] | permissive | CREATE PROC usp_GetEmployeesSalaryAboveNumber @Salary DECIMAL(15, 2)
AS
BEGIN
SELECT e.FirstName,
e.LastName
FROM Employees AS e
WHERE E.Salary >= @Salary
END;
EXEC usp_GetEmployeesSalaryAboveNumber 48100 | true |
a0160d43b59b140acce16dab556095d51f689b1e | SQL | dorukarslan/CryptoMarket_Database | /Queries.sql | UTF-8 | 6,750 | 4.25 | 4 | [
"CC0-1.0"
] | permissive |
//List name and TL values of currencies that have not experienced any decline in the last three days */
select distinct c.coin_name ,m.Price_of_coin from coin as c, market as m
where c.coin_id = m.Coin_ID and m.curr_date = '2021-05-16' and m.coin_id in ((select coin_id from market where DailyRat... | true |
a6292071508926f69bc8425d9a47d6b001ba73f4 | SQL | sajanchandran/FixturesForJ | /FixturesForJ/src/test/sql/V1.01__create_country.sql | UTF-8 | 297 | 3.171875 | 3 | [] | no_license | CREATE SEQUENCE SEQ_COUNTRY
INCREMENT BY 1
START WITH 1
MINVALUE 1
MAXVALUE 9999999;
CREATE TABLE T_COUNTRY
(
KEY INTEGER NOT NULL,
NAME VARCHAR(20),
CODE VARCHAR(20),
CAPITAL VARCHAR(20),
);
ALTER TABLE T_COUNTRY
ADD CONSTRAINT PK_COUNTRY PRIMARY KEY (KEY); | true |
77656ce24c04d8747440e4652a9a05f7cfaeb7f1 | SQL | kaizhou-College/apri-homework | /kz103-kate/struts2/struts2-04/作业/新版租房系统/数据库/create.sql | UTF-8 | 2,321 | 3.59375 | 4 | [] | no_license | alter table HOUSE
drop constraint FK_HOU_ST;
alter table HOUSE
drop constraint FK_HOU_US;
alter table HOUSE
drop constraint FK_HOU_TY;
alter table STREET
drop constraint FK_STR_DI;
drop table DISTRICT cascade constraints;
drop table HOUSE cascade constraints;
drop table STREET cascade constraints;
dr... | true |
7d14d61472514a50ad8cf08461cfe48e8f9ea72b | SQL | zouyuxiao/researchmanagement | /research.sql | UTF-8 | 10,980 | 3.703125 | 4 | [] | no_license | # 创建账户
# CREATE USER 'yangjiang'@'%'
# IDENTIFIED BY '123';
# 授予权限
# GRANT SHOW DATABASES, EVENT, INSERT, SELECT, SHOW VIEW, UPDATE ON research.* TO 'yangjiang'@'%';
# GRANT SHOW DATABASES ON *.* TO 'yangjiang'@'%';
# 刷新权限
# FLUSH PRIVILEGES;
# 创建数据库
CREATE DATABASE research
DEFAULT CHARACTER SET utf8
COLLATE utf8... | true |
84cf50c2c0e3aad7d734106912efe0b803d6cb95 | SQL | claudiomoscoso/timectrl-web | /WebContent/WEB-INF/sql/R1.0.0/rules-bsframework.sql | UTF-8 | 617 | 3.046875 | 3 | [] | no_license | ALTER TABLE bsframework.tR_UserDomain
ADD PRIMARY KEY(cUser, cDomain),
ADD INDEX index_domain (cDomain ASC),
ADD INDEX index_user (cUser ASC),
ADD CONSTRAINT r_UserDomainToUser FOREIGN KEY (cUser) REFERENCES bsframework.tUser(cId),
ADD CONSTRAINT r_UserDomainToDomain FOREIGN KEY (cDomain) REFERENCES bsframework.tD... | true |
8464d7c4b4f63ceeb2afbd8955faf18d89353c6c | SQL | Haard30/Group-Formation-Tool | /MySQL/sp_createCourse.sql | UTF-8 | 606 | 3.203125 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS sp_createCourse $$
DELIMITER $$
CREATE DEFINER=`CSCI5308_22_TEST_USER`@`%` PROCEDURE `sp_createCourse`(
IN courseId VARCHAR(40)
,IN course_name VARCHAR(40)
,IN course_credits VARCHAR(40)
,IN course_details VARCHAR(255)
,OUT createStatus BOOLEAN
)
BEGIN
IF NOT EXISTS(Select * from cour... | true |
1b0847b1754463b7d3ebbc4c73b4ee47a30cbb31 | SQL | jordanmoritz/covid-19-tracking | /dbt_covid_tracking/models/cleansed/ecdc_country_daily_volume.sql | UTF-8 | 2,063 | 3.6875 | 4 | [] | no_license | {{
config(
materialized = 'incremental',
incremental_strategy = 'insert_overwrite',
labels = {'type': 'cleansed', 'incremental': ''}
)
}}
{#
Would use {{ this }} rather than manually defining max date but finding issue
in BigQuery where processing associated with dbt generated sub-query is
expontential... | true |
eba933ff26fdebfb51d81452868d3446de548da5 | SQL | soedomoto/analev-r-redis | /test/analev.sql | UTF-8 | 14,343 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Generation Time: Sep 24, 2018 at 02:32 AM
-- Server version: 5.7.23
-- 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_CHARACTER_SET_C... | true |
6db785d7bd5b174f8f0df1194f7af50b0b6c6fdf | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/02868_select_support_from_keywords.sql | UTF-8 | 414 | 3.046875 | 3 | [
"BSL-1.0",
"Apache-2.0"
] | permissive | create table test_table ( `date` Date, `__sign` Int8, `from` Float64, `to` Float64 ) ENGINE = CollapsingMergeTree(__sign) PARTITION BY toYYYYMM(date) ORDER BY (date) SETTINGS index_granularity = 8192;
create VIEW test_view AS WITH cte AS (SELECT date, __sign, "from", "to" FROM test_table FINAL) SELECT date, __sign, "fr... | true |
d6fe9544aecbac5975f678763e05cb3203ad318d | SQL | henriw22/BootcampX | /1_queries/1_queries.sql | UTF-8 | 495 | 3.265625 | 3 | [] | no_license | SELECT id, name
FROM students
WHERE cohort_id = 1
ORDER BY name;
SELECT COUNT(id)
FROM students
WHERE cohort_id < 4;
SELECT name, id, cohort_id
FROM students
WHERE email IS NULL OR phone IS NULL;
SELECT name, email, id, cohort_id
FROM students
WHERE email <> '%@gmail.com' AND phone IS NULL;
... | true |
7382441c2fc6c0a31ecdd4e831035bdbc4eb8c60 | SQL | JitenSabharwal/chalkstreet | /chalkstreet.sql | UTF-8 | 4,082 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 18, 2015 at 08:37 PM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
cea1d7dda5f2b139fc4b5914c2110b88651a79b7 | SQL | renjieliu/leetcode | /database/1571.SQL | UTF-8 | 4,404 | 4.1875 | 4 | [] | no_license | /*
1571. Warehouse Manager
Table: Warehouse
+--------------+---------+
| Column Name | Type |
+--------------+---------+
| name | varchar |
| product_id | int |
| units | int |
+--------------+---------+
(name,product) is the primary key for this table.
Each row of this table... | true |
10eeaf3845fe4d3c895bd54a7ab773d27c5b0ad0 | SQL | DylanKersting/SnackPlease2 | /prisma/migrations/20210924235440_baseline_snack_please/migration.sql | UTF-8 | 718 | 3.4375 | 3 | [] | no_license | CREATE EXTENSION "uuid-ossp";
-- CreateTable
CREATE TABLE "active" (
"id" UUID NOT NULL DEFAULT uuid_generate_v4(),
"username" TEXT NOT NULL,
"lastused" TIMETZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "users" (
"id" UUID NOT NULL DEFAULT uuid_genera... | true |
ae39c8994cb3f48f63f31b7ebedaebe3bcbd6f70 | SQL | shaunscott12/CentraView | /database/email_update.sql | UTF-8 | 3,366 | 3.625 | 4 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `supportemailaccount`;
CREATE TABLE `supportemailaccount` (
`SupportEmailAccountID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`EmailAccountID` INT(11) UNSIGNED DEFAULT NULL,
PRIMARY KEY (`SupportEmailAccountID`),
UNIQUE KEY `SupportEmailAccountID` (`SupportEmailA... | true |
c3d571c035d9eeeca51cbb257c32f13b6e4211c6 | SQL | jgsimmerman/PHP_Wysiwyg | /install/dump.sql | UTF-8 | 25,862 | 3.46875 | 3 | [] | no_license | DROP TABLE IF EXISTS `codes`;
CREATE TABLE `codes` (
`code_id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`days` int(11) DEFAULT NULL COMMENT 'only applicable if type is redeemable',
`package_id` int(16) DEFAULT NULL,
`code` varchar(32) COLLATE utf8mb4_unicod... | true |
1d86950ae1d96f003dda353e69573063e42e14c4 | SQL | shinji-sub/Team-project | /doc/db/dummy_data.sql | UTF-8 | 32,297 | 2.8125 | 3 | [] | no_license | -- 학생 데이터
insert into user(user_no, email, name, password, tel, major, introduce, login_method, alterkey, create_date)
values(1, 'teacherkim@gmail.com', '김민성교수', password('1111'), '010-1111-1111', '국제통상학과', '국제무역 강의를 맡은 김민성 교수입니다. 반갑습니다.', 0, 'Y', '2020-01-01');
insert into user(user_no, email, name, password, tel, ma... | true |
f8887834e11e1e06a8e6e5f7f101849da9611e92 | SQL | br-monti/eggerp | /Egg-api/src/main/resources/db/migration/V01__create_grange_module.sql | UTF-8 | 3,322 | 3.078125 | 3 | [] | no_license | CREATE TABLE chicken_lineage (
id INT NOT NULL AUTO_INCREMENT,
lineage VARCHAR(15) NOT NULL,
chicken_color VARCHAR(15) NOT NULL,
provider VARCHAR(15) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE shed_manufacturer (
id INT NOT NULL AUTO_INCREMENT,
manufacturer VARCHAR(15... | true |
1695c2335c02a46b5d318368d6d11105087bcc7a | SQL | cckmit/xinfu | /ccms/WebContent/WEB-INF/action/project/fitness/guest/detail/gustinfo/getInfo_cus/getrecord.sql | UTF-8 | 3,554 | 3.25 | 3 | [] | no_license | select
code,
name,
(case sex when '0' then '女' when '1' then '男' else '未填' end) as sex,
mobile,
birth,
birthday,
wx,
qq,
(select s.name from hr_staff s where s.userlogin = mc) as mc,
(case type when '0' then '会员介绍(BR)' when '1' then '访客介绍(VR)' when '2' then '其他介绍(OR)'
when '3' then '电话咨询(TI)' when '4' ... | true |
75202c34010eb149320518a71bc26eb0f9e96c6d | SQL | m241dan/davengine2.1 | /sql/vars.sql | UTF-8 | 743 | 3.046875 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `vars`;
CREATE TABLE IF NOT EXISTS `vars` (
`ownertype` smallint NOT NULL DEFAULT '-1',
`ownerid` int NOT NULL DEFAULT '-1',
`name` varchar(60) NOT NULL DEFAULT ' ',
`indextype` smallint NOT NULL DEFAULT '-1',
`vindex` varchar(60) NOT NULL DEFAULT ' ',
`... | true |
5e5a539db9fce3e04efb85a35da020e3131a2814 | SQL | happything/qtv | /db.sql | UTF-8 | 9,749 | 3.171875 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 3408
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: quetevalga.com (MySQL 5.1.66)
# Database: qtvht
# Generation Time: 2013-01-04 23:19:55 +0000
# **********************************************... | true |
28a27dbc1ece4b5c7202de38a62eaa93a74c9c46 | SQL | 735516422/vueDog | /nodejsAdmin/db.sql | UTF-8 | 16,364 | 2.84375 | 3 | [] | no_license | SET NAMES UTF8;
DROP DATABASE IF EXISTS wxr;
CREATE DATABASE wxr CHARSET=UTF8;
USE wxr;
#宠物用品
CREATE TABLE wxr_product(
pid INT PRIMARY KEY AUTO_INCREMENT,
pname VARCHAR(32)
);
INSERT INTO wxr_product VALUES(null,"宠物食品");
INSERT INTO wxr_product VALUES(null,"宠物用品");
INSERT INTO wxr_product VALUES(null,"宠物药品");
... | true |
d68c664aadfd3e0fd54c248afeea2e26596317f0 | SQL | ChimpanG/CIVITAS-Berbers | /CIVITAS Berbers/CIVITAS Masinissa/Core/Masinissa_ModSupport.sql | UTF-8 | 1,246 | 2.890625 | 3 | [] | no_license | /*
Mod Support
Authors: SeelingCat
*/
-----------------------------------------------
-- GEDEMON'S YNAMP
-----------------------------------------------
CREATE TABLE IF NOT EXISTS StartPosition (MapName TEXT, Civilization TEXT, Leader TEXT, X INT default 0, Y INT default 0);
INSERT INTO StartPosition
(Civilizati... | true |
7a7051ec1112cda0576ac1bdea34d490e2f3a3b3 | SQL | patryllus/openmrs-module-spreadsheetimport | /testdata/post_demographics_processing_query.sql | UTF-8 | 15,747 | 2.75 | 3 | [] | no_license |
-- Add patient_id
alter table migration_tr.tr_hiv_enrollment add column patient_id int(100) default null;
alter table migration_tr.tr_hiv_program_enrollment add column patient_id int(100) default null;
alter table migration_tr.tr_hiv_program_discontinuation add column patient_id int(100) default null;
alter tabl... | true |
0a000e596a51bd29283e24980488d56b751adeea | SQL | rajkowski/crm-platform | /src/sql/postgresql/upgrade/2005-11-10-script01-partha.sql | UTF-8 | 687 | 2.984375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | -- Ticket Category Draft Assignment table
CREATE TABLE ticket_category_draft_assignment (
map_id SERIAL PRIMARY KEY,
category_id INTEGER NOT NULL REFERENCES ticket_category_draft(id),
department_id INTEGER REFERENCES lookup_department(code),
assigned_to INTEGER REFERENCES access(user_id),
group_id INTEGER REF... | true |
37738640ae4dccb8fe2444e2abe296fb0ecf9910 | SQL | filipemorelli/trabalho-faculdade | /sql.sql | UTF-8 | 5,938 | 3.6875 | 4 | [
"MIT"
] | permissive | -- Copiando estrutura para tabela job.empresas
CREATE TABLE IF NOT EXISTS `empresas` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) NOT NULL,
`ramo` varchar(255) NOT NULL,
`descricao_rapida` varchar(255) NOT NULL,
`qtde_empregados` varchar(255) NOT NULL,
`url_imagem` text,
`site` text,
`... | true |
693eae118036f04b6c098d25403181000f1f97e3 | SQL | mttchrry/fullstack-nanodegree-vm | /vagrant/catalog/catalog.sql | UTF-8 | 267 | 2.625 | 3 | [] | no_license | -- catalog definition of tables
DROP DATABASE IF EXISTS catalog;
CREATE DATABASE catalog;
\c catalog;
CREATE TABLE players(id SERIAL PRIMARY KEY, name varchar(50));
CREATE TABLE matches(winner integer REFERENCES players(id), loser integer REFERENCES players(id));
| true |
e65f3b48c13691e45c1de04b485e52d10e4f8ea3 | SQL | WDLNPH/coviddb | /database/sql/triggers.sql | UTF-8 | 3,474 | 3.765625 | 4 | [] | no_license | DROP TRIGGER IF EXISTS alertTrigger;
DELIMITER //
CREATE TRIGGER alertTrigger
AFTER UPDATE ON Region
FOR EACH ROW
BEGIN
INSERT INTO Messages(`message`, `region_id`, `msg_date`,`person_id`, `alert_id`, `diagnostic_id`)
SELECT
CONCAT(
'Bonsoir ', ps.first_name, ', (e-mail: ', ps.email, ')\n\n',
'This is an ... | true |
03a076566e601937f255994b4dd5c1833c9765eb | SQL | ashutoshpandey/larayoga | /app/database/larayoga.sql | UTF-8 | 19,182 | 3.25 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.20 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2015-06-03 08:42:57
-- -------... | true |
a9c66e11675da221178d01af959e73b593ac7043 | SQL | tony-hub/HIVESQL | /乘客rfm.sql | UTF-8 | 3,268 | 3.4375 | 3 | [] | no_license | create table service_security.p_rfm
(
pas_id bigint comment'乘客ID',
city_name string comment'城市的名称',
city_type string comment '城市的类型',
pas_r_value int comment'最近一次成单距离统计日期天数',
pas_f_value int comment'截止统计日期,用户在91天内的成单数',
pas_m_value int comment'截止统计日期,用户在91天内的成单的单均应付',
pas_rfm_type_fazhan tinyint comment'乘客rfm类别是否为发展',... | true |
c84aabba6fb3b8e99757330942683227d6400064 | SQL | Zero2k/bth_ramverk1_project | /sql/post_mysql.sql | UTF-8 | 1,226 | 3.484375 | 3 | [
"MIT"
] | permissive | USE vibe16;
SET NAMES utf8;
--
-- Table Post
--
DROP TABLE IF EXISTS ramverk1_Post;
CREATE TABLE ramverk1_Post (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
`userId` INTEGER NOT NULL,
`coinId` INTEGER NOT NULL,
`title` VARCHAR(100) NOT NULL,
`text` TEXT NOT NULL,
`html` TEXT,
`views`... | true |
8d146d9031f528aa403c894956b35d7bd6f34eff | SQL | clithyouvong/PortfolioReferences | /SQL/Working_GetUserDefinedFunctions.sql | UTF-8 | 955 | 4.15625 | 4 | [
"MIT"
] | permissive | select schema_name(obj.schema_id) as schema_name,
obj.name as function_name,
case type
when 'FN' then 'SQL scalar function'
when 'TF' then 'SQL inline table-valued function'
when 'IF' then 'SQL table-valued-function'
end as type,
substring(par.parameters... | true |
cdb76405efe45d2b4311f0dd0b895ff766a121df | SQL | N05L3N/Villalobos | /Villalobos.sql | UTF-8 | 4,180 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-10-2015 a las 19:36:11
-- Versión del servidor: 5.6.24
-- Versión de PHP: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
182697fcb66296e0b91f477f69f34a4ab9406dae | SQL | pronull/springbootdemo | /myspringboot/pc/src/main/resources/sql/v1.0.sql | UTF-8 | 1,495 | 3.296875 | 3 | [] | no_license | drop table if EXISTS `user`;
create table user(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`record_id` varchar(36) not null COMMENT '记录id',
`name` varchar(255) DEFAULT '' COMMENT '用户名',
`user_account` varchar(36) DEFAULT '' COMMENT '帐号',
`user_password` varchar(120) DEFAULT '' COMMENT '... | true |
e92ee46c067c436a2f4b6f0ce83706e8b6bdff3f | SQL | elbowgrrl/bootcampX | /1_queries/students_in_cohort.sql | UTF-8 | 68 | 2.546875 | 3 | [] | no_license | SELECT name, id
FROM students
WHERE cohort_id = 1
ORDER BY name ASC; | true |
bfc7b8c0d6c7a0c9191d622a3ef6e9317723e8be | SQL | maxCut/0xBU_SSS_ATM | /bank_server/bank_server/ectf_db.sql | UTF-8 | 874 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS cards;
DROP TABLE IF EXISTS atms;
create table cards (
account_name text NOT NULL CHECK (LENGTH(account_name) <= 1024),
card_id text NOT NULL CHECK (LENGTH(card_id) == 36),
balance integer NOT NULL DEFAULT (0) CHECK (balance >= 0),
no... | true |
b44775fbd43d005a59fe1f0b1d7b6d50e34d7e7e | SQL | mtayl062/wbproj | /sql_scripts/dump.sql | UTF-8 | 4,288 | 2.890625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.1
-- Dumped by pg_dump version 10.1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_m... | true |
8d81b4bbda81de448538ed85af1763a4d080b2e6 | SQL | sknabniai/karbase | /Sungero.FinancialArchive/VersionData/2.6.0.2/Script/convert_after_postgres.sql | UTF-8 | 2,499 | 2.8125 | 3 | [] | no_license | DO $$
BEGIN
IF NOT EXISTS(SELECT 1
FROM information_schema.Columns
WHERE table_name = 'sungero_content_edoc'
and column_name = 'counterparty_docflow_sungero')
THEN
alter table Sungero_Content_EDoc add Counterparty_Docflow_Sungero integer;
END IF;
... | true |
1b9b714c454732020cf630fb54ac90e1a2810369 | SQL | kristanlpruett/Mini-Project-ETL-KU-EDW-DATA | /table_queries.sql | UTF-8 | 1,355 | 3.40625 | 3 | [] | no_license | SELECT h.name AS "Hotel_Name", h.average_rating AS "Average_Rating", one.name AS "Restaurant_Name", one.postalcode AS "Postal_Code"
FROM PUBLIC."one_star" AS one
INNER JOIN PUBLIC."hotels_nodupes" AS h
ON h.postalcode = one.postalcode
WHERE h.postalcode = '90210'
OR h.postalcode = '90401'
OR h.postalcode = '92130'
OR ... | true |
fd10b4297594bc0fabcacd62a0c4afe859e61306 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day10/select0227.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-09T02:27:00Z' AND timestamp<'2017-11-10T02:27:00Z' AND temperature>=19 AND temperature<=31
| true |
20a1022a4bc8479abef054a466459c38bef74441 | SQL | HugoZou/UMIS | /06PHPMysql/上课代码/neuvideo .sql | UTF-8 | 4,626 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016 年 04 月 11 日 12:33
-- 服务器版本: 5.1.53
-- PHP 版本: 5.3.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... | true |
627f3c96f71ce2eaa202c49a1fb45d34591d1bb7 | SQL | warelab/gramene-lib | /schemas/ensembl/ensembl-variation-innodb.sql | UTF-8 | 43,795 | 3.171875 | 3 | [] | no_license | SET storage_engine=InnoDB;
CREATE table variation (
variation_id int(10) unsigned not null auto_increment, # PK
source_id int(10) unsigned not null,
name varchar(255),
validation_status SET('cluster','freq',
'submitter','doublehit',
'hapmap','1000Genome',
'failed','precious'),
an... | true |
eee2a6177ac73ef2104d1dfc86164a462d704553 | SQL | Khachatur86/Netology.Python-13.lesson-2.4 | /Migrations/880_ELCODATA_Add_Attributes.sql | UTF-8 | 706 | 2.6875 | 3 | [] | no_license | ------------------------------------------------------------------------
-- MANAGE ATTRIBUTES : ADD, UPDATE AND DELETE ATTRIBUTES
--
-- @program All
-- @version 1.33.0.3
-- @module ELCODATA
------------------------------------------------------------------------
----------------------------------------------------... | true |
c030928e16dab2817ffeb125ee4b144e11071f5f | SQL | gxlioper/ecology | /data/Oracle/sql201508180701.sql | GB18030 | 2,059 | 2.609375 | 3 | [] | no_license | alter table mode_dmlactionset add isResetRight int
/
alter table mode_dmlactionset add targetModeid int
/
delete from HtmlLabelIndex where id=125371
/
delete from HtmlLabelInfo where indexid=125371
/
INSERT INTO HtmlLabelIndex values(125371,'ⲿԴΪ')
/
INSERT INTO HtmlLabelInfo VALUES(125371,'ⲿԴΪ',7)
/
INSERT INTO... | true |
47781112371bee1c7739c8638d9df68250f7a4d4 | SQL | Campinez/Ejercicios-MsSQL | /prueba.sql | UTF-8 | 5,357 | 3.59375 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... | true |
fcadb625aa22e615c782433e448a93aacaf7a2bd | SQL | JEonjinwon/Oracle | /2020-08-20.SQL | UHC | 3,010 | 4.3125 | 4 | [] | no_license | 2020-08-20-01
2. AVG
()
AVG(expr)
- expr ÷̳
- ε expr ȯ
) ̺ μ Ͻÿ
SELECT DEPARTMENT_ID AS μڵ,
ROUND(AVG(SALARY),1) AS ձ
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
ORDER BY 1;
1) ȸ̺ 50 ոϸ Ͻÿ .
SELECT SUBSTR(MEM_REGNO2,1,1) AS ,
ROUND(AVG(MEM_MILEAGE),1) AS ոϸ
FROM MEMBER
WHE... | true |
363c9445b206b948b28e846bd7fe0cbad7673412 | SQL | xjpz/slick-codegen-example | /src/main/sql/create.sql | UTF-8 | 875 | 2.796875 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
`name` varchar(100) NOT NULL COMMENT '用户名',
`password` char(50) NOT NULL COMMENT '密码',
`email` varchar(100) DEFAULT '' COMMENT '邮箱',
`phone` char(11) DEFAULT '' COMMENT '电话',
`type` tinyint(1) u... | true |
8ccb0e200fd01f59fce0f9821fcd3cba4755df85 | SQL | yennanliu/CS_basics | /leetcode_SQL/group-employees-of-the-same-salary.sql.sql | UTF-8 | 3,707 | 4.90625 | 5 | [] | no_license | /*
Given two tables as below, write a query to display the comparison result (higher/lower/same) of the average salary of employees in a department to the company’s average salary.
Table: salary
| id | employee_id | amount | pay_date |
|----|-------------|--------|------------|
| 1 | 1 | 9000 | 2017-03... | true |
5382119d4f538971e5442ba2bff12a97245ef460 | SQL | PedroMP/Agendo | /_dbtestMySqlCreation.sql | UTF-8 | 66,479 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 28, 2011 at 10:51
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.