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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3a71c72ac807f81ce76a16981fdaa4ba9297d62b | SQL | duygut/Movie_Analysis_with_PostgreSQL | /rating_dataset.sql | UTF-8 | 4,815 | 4.21875 | 4 | [] | no_license | -- Replace single quotes with double quotes in order to use Postgres JSON functions properly
WITH temp_genres AS (
SELECT regexp_replace(genres, '''', '"', 'g') AS genres_fixed, id AS movie_id FROM tyler_burkett379.movies_metadata
),
-- Parse json strings into columns
genres_parsed AS (
SELECT arr.item_object->>'name'... | true |
e14b756589b732cffe7d4bdf6288fa6bb602bfcd | SQL | harakonan/research-public | /ndb/NDB-UTDPH/TestDBSetup/ddl/12_CB_MASTER/30_CREATE_TABLE_CMDS_M_GENERIC.sql | UTF-8 | 299 | 2.71875 | 3 | [] | no_license | CREATE TABLE "CMDS_M_GENERIC"
(
"GENERIC" VARCHAR2 (1) NOT NULL ENABLE,
"GENERIC_NAME" NVARCHAR2(10),
CONSTRAINT "CMDS_M_GENERIC_PK" PRIMARY KEY ("GENERIC") USING INDEX
TABLESPACE NDB_USERS1
)
TABLESPACE NDB_USERS1
NOLOGGING
PARALLEL 96
;
| true |
e95d5f7493dacb8c54af84d6f358d94e5a6b609c | SQL | ahlijatinuraminah/company165 | /db/company.sql | UTF-8 | 15,012 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 06, 2021 at 04:10 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
9aa2ad0fcd7ada9cb0b498c2b1d29a47f096e750 | SQL | madhucse/GymTracker | /CaseStudySBA/CasestudyDb.sql | UTF-8 | 1,431 | 3.1875 | 3 | [] | no_license | create database CaseStudySBA
use CaseStudySBA
drop table Workout_Category
create table Workout_Category
(
category_id int identity primary key,
category_name varchar(64)
)
insert into Workout_Category values('Jogging')
insert into Workout_Category values('Sprint')
insert into Workout_Category values('Cardio')
ins... | true |
abc1cdb1386ed8a917478dbef2caeec6b3463887 | SQL | msw822/xjny_dev | /xjny_version/dw_hadoop/table/dim/hb_gjdq.sql | UTF-8 | 563 | 2.6875 | 3 | [] | no_license | -- DESCRIPTION: 各级地区
--
-- OPTIONS: ---
-- REQUIREMENTS: ---
-- BUGS: ---
-- NOTES: ---
-- AUTHOR: song.shengjie@h3c.com
-- COMPANY: h3c.bigdata
-- VERSION: 1.0
-- CREATED: 2017/08/18
-- REVIEWER:
-- REVISION: ---
--
use dim;
DROP TABLE IF EXISTS hb_gjdq;
CREATE EXTERNAL TABL... | true |
7f80c333b54033eecdc8875f893497b480ae48b9 | SQL | Liuizn/SA02-03 | /banco de dados.sql | UTF-8 | 1,603 | 3.296875 | 3 | [] | no_license | # create database if not exists agencia_estetica;
# use agencia_estetica;
create table if not exists pacientes(
id_pacientes int(6) not null auto_increment primary key,
nome varchar(50) not null,
celular varchar(20) not null,
fixo1 varchar(20),
fixo2 varchar(20),
email varchar(60) not null,
cep varchar(9) not null,
bai... | true |
d5cb1cb21554dcba318b2b76f708789b17b086c6 | SQL | STKGarching/website | /src/server/database/club/queries/task_add.sql | UTF-8 | 721 | 3.734375 | 4 | [] | no_license | WITH relationship_type AS (
SELECT
relationship_type_id
FROM
club.relationship_type
WHERE
1=1
AND relationship_type_no = 2 /* Ersteller */
)
,task AS (
INSERT INTO club.task (task_no, title, description, task_priority_id, created_at, modified_at, due_date, task_status_id, resolution_date)
SELECT
nex... | true |
6d6526053821b6ca422bcea701955f1768fac566 | SQL | Sasha2805/GoJava-Developer-module1 | /homework1.2/1.sql | UTF-8 | 617 | 4.03125 | 4 | [] | no_license | # Добавить разработчикам поле (salary - зарплата).
USE development;
ALTER TABLE developers ADD salary DECIMAL(10, 2);
CREATE TABLE developers_salary(
developer_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
salary DECIMAL(10, 2),
FOREIGN KEY(developer_id) REFERENCES developers (id)
);
INSERT INTO developers_salary(d... | true |
c0ec5fa09299cb8c0fa5bd7d2f20491c40c1e99d | SQL | Prock-Liy/Turalyon | /turalyon-cloud/ddl/turalyon_base.sql | UTF-8 | 13,723 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : docker_192.168.33.10
Source Server Type : MySQL
Source Server Version : 50724
Source Host : 192.168.33.10:3306
Source Schema : cloud_base
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Dat... | true |
3187745a90e1ecaddd2f072a569b095ac69374d4 | SQL | PaDiOc18/CETYS | /5th_semester/databases_systems/3rd_partial/Caso Farmacia/StoredProceduresFarmacia3_Diaz_Valenzuela.sql | UTF-8 | 2,728 | 4.125 | 4 | [] | no_license | #Stored Procedures farmacia3
use farmacia3;
#Un stored procedure para seleccionar todos los trabajadores de un distrito
DELIMITER //
CREATE PROCEDURE GetEmployeesFromDistrict(id_distrito int)
BEGIN
SELECT * FROM employee where id_district = id_distrito;
END //
DELIMITER ;
call GetEmployeesFromDistrict(1); #P
#Un s... | true |
26658ab77c8ff99b80d897f2bfcb51c8cd12e731 | SQL | mateuszrusiecki/test_b2b | /app/Config/Schema/deploy/baza_39808.sql | UTF-8 | 731 | 3.28125 | 3 | [] | no_license | DROP TABLE events_defined;
CREATE TABLE IF NOT EXISTS `events_defined` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 NOT NULL,
`month` int(10) NOT NULL,
`day` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10;
INSERT INTO `events_... | true |
03fc3954ac135508b584cf67daa0fdb1d0b55e1f | SQL | ayushk1234/PortfolioProject | /COwidPortfolio.sql | UTF-8 | 5,004 | 4.03125 | 4 | [] | no_license | SELECT *
from PortfolioProject..death
order by 3,4
SElECT *
FROM PortfolioProject..vaccine
order by 3,4
SELECT *
FROM PortfolioProject..death
SELECT location,date,total_cases,new_cases,total_deaths,population
FROM PortfolioProject..death
order by 1,2
--looking at Total Cases vs Total Deaths
--sho... | true |
ac5ac260ed0a0a6514911eb1b785805506f785fb | SQL | cathubhome/springbootDoor | /db/V20180505.1__sys_user.sql | UTF-8 | 988 | 3.25 | 3 | [] | no_license | CREATE TABLE `sys_user` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '操作员id',
`user_name` VARCHAR(32) DEFAULT NULL COMMENT '操作员登陆账户',
`password` VARCHAR(100) DEFAULT NULL COMMENT '操作员登陆密码',
`phone` VARCHAR(20) DEFAULT NULL COMMENT '操作员电话',
`email` VARCHAR(32) DEFAULT NULL COMMENT '操作员邮箱',
`status` TINY... | true |
8b7be57cde4632733ce49d747b0ab27499c01fa1 | SQL | wskvfhprrk/piHome | /src/main/resources/schema.sql | UTF-8 | 1,059 | 3.09375 | 3 | [] | no_license |
DROP TABLE IF EXISTS piHome;
CREATE TABLE piHome
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
openInHex TEXT NOT NULL,
closeInHex TEXT NOT NULL,
groupName TEXT NOT NULL,
switchName TEXT NOT NULL,
status INT DEFAULT 1,
openOutHex TEXT NOT NULL,
closeOutHex TEXT NOT NULL
)... | true |
2bd35714f71197199a0442fb13bd2dd77859f5a2 | SQL | henryjahja/dhea-konseling | /konseling (2).sql | UTF-8 | 3,409 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 07, 2013 at 05:14 PM
-- 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_S... | true |
75f403b6e5d56df8d64f5062515da6a20c1eaf9c | SQL | mahbuburriad/expensemanager | /Database File/expense.sql | UTF-8 | 8,937 | 3.546875 | 4 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2021 at 06:44 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
1dc625c3d7390b5e44e753e78c6fcdf04f5a0879 | SQL | ka10a/DIHT | /DataBases/CW/1.SQL | UTF-8 | 83 | 2.5625 | 3 | [] | no_license | SELECT CustomerType, COUNT(CustomerID) as Cnt FROM Customer
GROUP BY CustomerType; | true |
10e44de3464cb54538bdbed768d6583c10113b66 | SQL | freecodecamp-fresnoca/codecamp-databases | /queries/mysql.sql | UTF-8 | 269 | 3 | 3 | [] | no_license | --http://www.tutorialspoint.com/mysql/mysql-create-tables.htm
CREATE TABLE tutorials_tbl(
tutorial_id INT NOT NULL AUTO_INCREMENT,
tutorial_title VARCHAR(100) NOT NULL,
tutorial_author VARCHAR(40) NOT NULL,
submission_date DATE,
PRIMARY KEY ( tutorial_id ));
| true |
4160e95e260aa865976dfecb36979844c92d7160 | SQL | Momc1lo/IMDbSimpleApp | /imdb.sql | UTF-8 | 4,952 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 12, 2021 at 12:25 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
5f0fe6f071ec4cfc8eb1421c92fe722117ee8909 | SQL | taipeifx/vote_data_TW | /2012_13/data cleaning 13.sql | UTF-8 | 4,433 | 3.75 | 4 | [] | no_license | #EXPORT TO CSV FROM RESULTS FOR CLEANER DATA
### update a single row's column
################### DATA CLEANING #############################
#1 "attach elpaty to elcand"
#use elpaty 9 unless things change
CREATE TABLE cand_13 AS
SELECT elcand_13.CanNum, elcand_13.CanName, elcand_13.Sex, elcand_13.Age, elcand_13.Cu... | true |
06cbd35a87c73f2e6193a8308b9639fac8f570e9 | SQL | beneficio/benefweb | /shell script/var/lib/pgsql/report-pgsql.sql | UTF-8 | 705 | 3.34375 | 3 | [] | no_license | -- SQL script to create reports database for PostgreSQL
--
-- To run, type: psql template1 < reports-pgsql.sql
--
-- $Id: reports-pgsql.sql,v 1.3 2003/10/23 08:32:20 chriskl Exp $
CREATE DATABASE phppgadmin;
\connect phppgadmin
CREATE TABLE ppa_reports (
report_id SERIAL,
report_name varchar(255) NOT NULL,
db_na... | true |
6bc59b7b4c51916cfd35a0e269dfbf32bf6e36d6 | SQL | amaldonado1215/DataWarehouse | /vwAppealNotes.sql | UTF-8 | 2,059 | 3.25 | 3 | [] | no_license | /*******PRO QUERY**********************/
ALTER VIEW vwAppealNotesPro as
select distinct bn.*, vwcases.dos, vwcases.region_short_name as region, vwcases.defaultentity, [primary insurance],
[1st insurance category], CorrectProEntity, notes_3300.initialdate, notes_3300.note, notes_3300.note_type
from
(
select... | true |
0a41c6295f07ce9ce43cdbec5adf3205504eb059 | SQL | arpitnarechania/sqlqueries | /openplanets_plato.sql | UTF-8 | 2,064 | 2.84375 | 3 | [] | no_license | SELECT l from VPlanLeaf l WHERE l.planId IN (:selectedPlans)
select n from TemplateTree n where name = :name
select d from SampleRecordsDefinition d
SELECT u FROM User u WHERE u.userGroup = :changedGroup
Select u from User u where u.username = :username
SELECT h from CriteriaHierarchy h
SELECT password FROM IdpUser WHE... | true |
f8a7fd87465fd1f7ded6b571db7360ca3049a247 | SQL | erikunda77/DomesticHelper | /services.sql | UTF-8 | 3,150 | 3.125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 20, 2021 at 05:06 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
3a5231f985b4a2436aca073c5d3bde274bf7597e | SQL | caoxiemeihao/web-error-log | /database/cj_web_log.sql | UTF-8 | 1,274 | 2.984375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50506
Source Host : localhost:3306
Source Schema : cj_web_log
Target Server Type : MySQL
Target Server Version : 50506
File Encoding : 65001
Date: 30/10/2019... | true |
7832e31a509bcd1a702e3474199d316bb66c0b8b | SQL | Feng-USX/Leetcode-Problems | /Others /# 620. Not Boring Movies.sql | UTF-8 | 221 | 3.171875 | 3 | [] | no_license | # 620. Not Boring Movies
# Output movies with an odd numbered ID and a description that is not 'boring'. Order the result by rating
SELECT *
FROM cinema
WHERE description != "boring"
AND id%2 = 1
ORDER BY rating DESC
; | true |
e726352be37dc27cabe00867c9a0747f1e84f872 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day19/select1743.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T17:43:00Z' AND timestamp<'2017-11-19T17:43:00Z' AND temperature>=39 AND temperature<=76
| true |
65b5810b704b69dce4fde82377ca20a90bacf248 | SQL | tracymacding/galaxy-s3-gateway | /db/mysql/resource/glaxyfs_proxy.sql | UTF-8 | 5,131 | 3.734375 | 4 | [] | no_license | CREATE TABLE `ID` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '全局自增ID',
`value` int unsigned NOT NULL COMMENT '',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='全局自增ID';
CREATE TABLE `Bucket` (
`BucketID` bigint(20) unsigned NOT NULL COMMENT '桶ID',
`BucketName` varchar(64) NO... | true |
b001f4ec67987336d6b52d001a93b1e645b9ec9b | SQL | trabisdementia/xuups | /modules/smartobject/sql/mysql.sql | WINDOWS-1252 | 4,221 | 2.96875 | 3 | [] | no_license | CREATE TABLE `smartobject_meta` (
`metakey` varchar(50) NOT NULL default '',
`metavalue` varchar(255) NOT NULL default '',
PRIMARY KEY (`metakey`)
) ENGINE=MyISAM COMMENT='SmartObject by The SmartFactory <www.smartfactory.ca>' ;
INSERT INTO `smartobject_meta` VALUES ('version','2');
CREATE TABLE `smarto... | true |
c2a1cd1f926295cb753cac0f1beada65d64afcfa | SQL | mavalos90/codewars_katas | /sql/6_kyu/sql_null_handling.sql | UTF-8 | 851 | 4.40625 | 4 | [] | no_license | /*
SQL Basics: Simple NULL handling
6 kyu
For this challenge you need to create a SELECT statement, this select statement must have NULL handling, using COALESCE and NULLIF.
If no name is specified you must replace with [product name not found]
If no card_name is specified you must replace with [card name not found]
I... | true |
411aa259a93f43fe81bc045dc7dbb32de046dae5 | SQL | radtek/tensordev | /sql/db_perf_redo_log_contention.sql | UTF-8 | 1,824 | 3.390625 | 3 | [] | no_license | -- -----------------------------------------------------------------------------------
-- File Name : db_perf_redo_log_contention.sql
-- Description : Report on overall redo log contention for the instance since
-- the instance was last started
-- Requirements : Access to the DBA views.
-- Call ... | true |
b418df4f3ed74eed1ca1464527002dce88bcbd68 | SQL | lgcarrier/AFW | /5.2.3/Database/Constraints/AFW_12_FAVR_FK2.sql | UTF-8 | 158 | 2.8125 | 3 | [
"MIT"
] | permissive | SET DEFINE OFF;
ALTER TABLE AFW_12_FAVR ADD (
CONSTRAINT AFW_12_FAVR_FK2
FOREIGN KEY (REF_UTILS)
REFERENCES AFW_12_UTILS (SEQNC)
ENABLE VALIDATE)
/
| true |
0ecbfee44cd854fad84a8b24c658fbb50b103d56 | SQL | AndreasCtrl/privateSchool | /privateSchoolStatement.sql | UTF-8 | 5,726 | 3.953125 | 4 | [] | no_license | -- Create Schema
CREATE SCHEMA IF NOT EXISTS private_school_db;
USE private_school_db;
-- Create Tables
CREATE TABLE IF NOT EXISTS private_school_db.courses (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(45) NOT NULL,
stream VARCHAR(45) NOT NULL,
type VARCHAR(45) NOT NULL,
start_date DATE NOT NULL... | true |
c8f918fd81cfe4a28cfbc1a3f540d84e897d0a3b | SQL | ornahasson/CoronaInvestigation | /server/src/ScriptRunner/Scripts/Archive/Sprint_18/BLK_new_identification_types.sql | UTF-8 | 3,004 | 3.953125 | 4 | [] | no_license | -- Alter identification_type table: adding new column of id
ALTER TABLE public.identification_type
ADD COLUMN IF NOT EXISTS id INTEGER;
-- Updating values in identification_type table
UPDATE public.identification_type
SET id=1
WHERE type='ת"ז';
UPDATE public.identification_type
SET id=2
WHERE type='דרכון';... | true |
888dda184819049ccc8f55373c858e76878bccb8 | SQL | HTTPArchive/almanac.httparchive.org | /sql/2019/fonts/06_09b.sql | UTF-8 | 1,130 | 3.90625 | 4 | [
"Apache-2.0"
] | permissive | #standardSQL
# 06_09b: Distribution of duplicate font-family values per page (see 02_35)
CREATE TEMPORARY FUNCTION getFonts(css STRING)
RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
var reduceValues = (values, rule) => {
if ('rules' in rule) {
return rule.rules.reduce(reduceValues, values);
}
if (!... | true |
8f6cf4f43515b6a8ec61e4cba13fc25e3dcef047 | SQL | denyskaduk/Vocabulary-v5.0 | /CVX/create_source_tables.sql | UTF-8 | 2,352 | 3.546875 | 4 | [
"Unlicense"
] | permissive | /**************************************************************************
* Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI)
*
* 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 Li... | true |
0d392e154683049a1a50e5ecb217bced845e719a | SQL | noriyuki-shimizu/myClothes | /src/main/resources/db/schema.sql | UTF-8 | 2,680 | 3.75 | 4 | [] | no_license | -- drop all tables
drop table if exists b_screen;
drop table if exists b_menu;
drop table if exists my_clothes;
drop table if exists m_brand;
drop table if exists m_genre;
drop table if exists m_shop;
drop table if exists m_log;
-- create tables base
-- メニューマスタ
create table b_menu (
menu_id bigserial PRIMARY KEY,
... | true |
117a80bd334a441de9d734c755db6caecbf7031d | SQL | xeredi/portico | /integra-portico-db/etc/integra2/plantilla/PARAM_VALORADOR.sql | WINDOWS-1252 | 48,379 | 2.875 | 3 | [] | no_license | SET DEFINE OFF;
Insert into PARAM_VALORADOR
(CODIGO, NOMBREREGLA, DESCRIPCIONREGLA, VALORADORASOCIADO, VALOR, BAJA, INDAP)
Values
(32, 'Regla para Exencin TR por regla 7 das', 'Regla para marcar como exenta TR, al liquidar, por regla 7 das. Si vale 0, no se aplica esta regla. Si vale 1, se aplica la regla po... | true |
78fdbf501d436f324ac2172bb2462f0e25c1c3f8 | SQL | caiobassani/pdc | /db/script.sql | UTF-8 | 1,060 | 3.359375 | 3 | [] | no_license | use pdc;
-- Tabela Filial
CREATE TABLE Filial (
idFilial INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
nome VARCHAR(128) NOT NULL UNIQUE
);
-- Tabela Cliente
CREATE TABLE Cliente (
idCliente INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
nome VARCHAR(128) NOT NULL UNIQUE,
idFilial INTEGER NOT NULL,
FOREIGN KEY... | true |
9afbcbadbb7da2aa7b049a26bb00cc9ed1345854 | SQL | gabrielgrazziani/Projeto-Integrador-5 | /BancoPi5/bancoPi5 1.0.4.sql | UTF-8 | 345 | 3.015625 | 3 | [] | no_license | create table historico(
id_historico integer primary key,
data_historico date ,
status varchar ,
ordemServico integer ,
funcionario integer
);
Alter table public.historico
add foreign key(ordemServico)
references public.ordemservico(ordem_id);
Alter table public.historico
add foreign key(funcionario)
references ... | true |
e27af7899989f31057d5c76c9b172ae937476644 | SQL | VoluntariosCTESPUMa/FormPesquisa | /ProjTurismoUMa 1.0/turismo.sql | UTF-8 | 2,936 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 25-Jun-2018 às 13:56
-- Versão do servidor: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
34f9c8025d059b76294418677b38757109d51265 | SQL | Rahimbadsa/newproject | /#Dump/bankdb_loan.sql | UTF-8 | 2,449 | 2.984375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `bankdb` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `bankdb`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: bankdb
-- ------------------------------------------------------
-- Server version 5.7.15-log
/*!40101 SET @OLD_CHARACTER_SET_... | true |
bf7c80ebdb9ba722db74f5135a426f999e87d418 | SQL | EvgeniManolov/CSharp-DataBase | /BuiltInFunctions/BuiltInFunctions/14. Get Users with IPAdress Like Pattern.sql | UTF-8 | 129 | 2.875 | 3 | [] | no_license | SELECT Username,
IpAddress AS [IP Address]
FROM Users
WHERE IpAddress LIKE ( '___.1%.%.___' )
ORDER BY Username | true |
6fa320eead74eb0bef4fbd54bbaa15c3205f98e9 | SQL | fajar098123/Kel3Bondowoso_WorkshopWeb | /Tugas Form Mahasiswa Database/Bootstrap-Mahasiswa_Iphang Rere Admaja/Nama DB = universitas/mahasiswa.sql | UTF-8 | 2,109 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 05, 2020 at 04:59 AM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
52b98b64e4f4e26c22a95188f05c741235d8c250 | SQL | radtek/abs3 | /sql/mmfo/bars/Procedure/web_tt_bm.sql | WINDOWS-1251 | 1,444 | 2.90625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/WEB_TT_BM.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** Create procedure... | true |
adaad4a6c9e4d7bc1593165413d50a6deb370d4d | SQL | gopi158/Sample | /FinaoDb/Stored Procedures/getfinaoscountdet.SQL | UTF-8 | 250 | 3.265625 | 3 | [] | no_license | DELIMITER //
CREATE PROCEDURE getfinaoscountdet (IN userid INT)
BEGIN
SELECT user_tileid FROM `fn_user_finao_tile` ft JOIN fn_user_finao fu ON fu.`user_finao_id` = ft.`finao_id` WHERE ft.userid =userid AND finao_activestatus !=2;
END //
DELIMITER //
| true |
0176eaada54aa783a96fe4fbfd4db411cb737ec4 | SQL | alejandroMAD/SQL-university-schema | /SQL-university-schema.sql | UTF-8 | 26,102 | 3.796875 | 4 | [] | no_license | CREATE SCHEMA `university_schema` ;
CREATE TABLE `university_schema`.`courses` (
`courses_id` INT NOT NULL AUTO_INCREMENT,
`courses_name` VARCHAR(100) NOT NULL,
PRIMARY KEY (`courses_id`),
UNIQUE INDEX `courses_id_UNIQUE` (`courses_id` ASC) VISIBLE,
UNIQUE INDEX `courses_name_UNIQUE` (`courses_name` ASC) VIS... | true |
56d96106107ae959d023858e259f958ee63cf329 | SQL | j112929/uniauth | /uniauth-server/src/script/sql/rt175-ddl.sql | UTF-8 | 11,270 | 3.6875 | 4 | [
"Apache-2.0"
] | permissive | -- Update table user_extend
ALTER TABLE user_extend MODIFY `description` VARCHAR(200) COMMENT '扩展属性描述';
ALTER TABLE user_extend ADD category VARCHAR(30) COMMENT '扩展属性类型' after code;
ALTER TABLE user_extend ADD subcategory VARCHAR(30) COMMENT '扩展属性子类型' after category;
ALTER TABLE user_extend ADD INDEX idx_user_extend_co... | true |
79fe0a00492a8b0b740e0390b681b0ebef4001c7 | SQL | erictumuti/databases | /codehacking.sql | UTF-8 | 13,246 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 10, 2020 at 10:11 AM
-- Server version: 8.0.20-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
67d60d833a8bfd8c7e941ac6e2217c6dbb46f441 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day12/select2141.sql | UTF-8 | 269 | 3.046875 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['3100_4','4243','5081','4065','5059','3008','3202','5091','3051','2008'])
| true |
24168a9bbe7e5ba89f352bda6193c4f80b978bcd | SQL | dingshuangwei/dingshuangwei.github.io | /1dbwait/sess_open_cursor.sql | UTF-8 | 524 | 2.859375 | 3 | [] | no_license | set echo off
store set sqlplusset replace
set echo off
set verify off
set serveroutput on
set feedback off
set lines 200
set pages 1000
col user_name for a15
SELECT a.user_name,
a.sid,
a.hash_value,
b.VALUE open_cursor,
a.sql_id,
a.sql_text
FROM v$OPEN_CURSOR a, v$sesstat b, V$STAT... | true |
4fecfd2ffbb56c0ed9609ccf1c63c7692c5744f4 | SQL | jamespericles/Flare | /seeders/seeders.sql | UTF-8 | 5,335 | 2.765625 | 3 | [
"MIT"
] | permissive | -- how to handle foreign keys for groups and contacts
INSERT INTO `users` (
id, first_name, last_name, email, address1, address2, city, state, zip, mobile, password, last_login, createdAt, updatedAt
)
VALUES
(1, "James", "Pericles", "james.pericles@aol.com", "2681 Noblewood Circle", "Apt 2518", "Raleigh", "NC", "... | true |
fc4697497dbcf9a0ded2b2b565d515f14ee2eb1e | SQL | MarioSposato/Data-Science-at-Scale | /assignment2/mat_mul.sql | UTF-8 | 148 | 3.875 | 4 | [] | no_license | SELECT a.row_num,
b.col_num,
SUM(a.value * b.value) AS value
FROM a
INNER JOIN b
ON a.col_num = b.row_num
GROUP BY a.row_num, b.col_num; | true |
5198819127afa80337a08b9f7b4319bc1eba2d7e | SQL | wangqi791975/UserRolePermission | /HC.JiShi.Role/sqlscript/用户权限表结构脚本.sql | GB18030 | 2,071 | 4.15625 | 4 | [] | no_license | CREATE TABLE [User] (
Id INT IDENTITY(1,1) PRIMARY KEY,
UserName NVARCHAR(20) NOT NULL,
[Password] VARCHAR(32) NOT NULL,
IsAdmin BIT NOT NULL DEFAULT(0),
IsValid BIT NOT NULL DEFAULT(1),
CreateDate DATETIME DEFAULT(GETDATE())
)
CREATE TABLE [Role] (
Id INT IDENTITY(1,1) PRIMARY KEY,
RoleName NVARCHAR(20) NOT... | true |
2de896f10f04a0e302a178165cd9e1742eb48641 | SQL | ownk/apps | /FS_Recaudos/scriptsBD/scriptsBDOracle/01_UnificadorArchivos/01_lineaBase/01_TABLAS/AUT_TSROL.sql | WINDOWS-1250 | 1,648 | 3.65625 | 4 | [] | no_license | /******************************************************************************
VERSION: 1.0
FECHA: 19/03/2015
AUTOR: ownk
******************************************************************************/
set define '&'
define Indices=TS_IRECAUDOS
Prompt
Prompt Creando tabla AUT_TSROL
Prompt
CREATE TABLE ... | true |
4f058fc471ebec2c61875134db47609e51f73979 | SQL | scheidm/panda-path | /createDB.sql | UTF-8 | 2,347 | 3.625 | 4 | [] | no_license | CREATE TABLE persona (
persona_id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
realm TEXT NOT NULL,
last_render INTEGER NOT NULL,
last_quest INTEGER,
last_location INTEGER,
level INTEGER NOT NULL,
gear_md5 TEXT DEFAULT NULL,
UNIQUE (name,realm)
);
CREATE TABLE location(
loc_id INTEGER PRI... | true |
82123a6b7c7a1d234ebb4b15fe9a9d8e8d024f3d | SQL | MaxStgs/Classifier3 | /test.sql | UTF-8 | 730 | 3.171875 | 3 | [] | no_license | delete from test;
insert into test values (0, 'E1', -1), (1, 'E2', 0), (2, 'E3', 0), (3, 'E4', 0), (4, 'E3', 1), (5, 'E4', 1);
insert into test values (6, 'E5', 5);
WITH RECURSIVE b(parentElementId,id,elementName,isEnd,isIndexed,isRoot) AS
(
SELECT 6,0,0,0,0,0
UNION ALL
SELECT elements.parentElementId, el... | true |
8818d330e3450e6294af9a964c2e0aa6fce48ba2 | SQL | vasilescur/techolympics-website | /report.sql | UTF-8 | 13,695 | 3.578125 | 4 | [] | no_license | -- Welcome to the depths of Hell. Enjoy your stay! :)
SELECT (
CASE WHEN (
SELECT `value`
FROM wpxp_rg_lead_detail
WHERE `field_number` = 5
AND `form_id` = 1
AND `lead_id` IN ( ... | true |
6cda2203253ca1bc02e9f61bfe42518ca51c9de7 | SQL | adrianobragaalencar/ShalomSeminary | /Shalom/sql/create/create_table_neighbor.sql | UTF-8 | 307 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | --
-- Copyright (c) 2013, Yatta Tech and/or its affiliates. All rights reserved.
-- YATTATECH PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--
CREATE TABLE neighbor (
"cd_neighbor" INTEGER PRIMARY KEY NOT NULL,
"cd_city" INTEGER NOT NULL,
"neighbor_name" TEXT NOT NULL
)
| true |
172ed2e577625d57db21c564f8aa4ccec99b4670 | SQL | lindseyolson/SQL-joins | /joins-solution.sql | UTF-8 | 1,575 | 4.53125 | 5 | [] | no_license | -- tasks
-- 1 Get all customers and their addresses.
SELECT * FROM customers
JOIN addresses ON customers.id =addresses.customer_id;
--2 Get all orders and their line items.
SELECT * FROM orders
JOIN line_items ON orders.id= line_items.product_id;
--3 Which warehouses have cheetos?
SELECT warehouse.warehouse, product... | true |
b04e6bb877f32cfa643deed5f5fb55f346d51cef | SQL | FinchMF/NetMap | /src/database/sql/queries/sqlCommands.sql | UTF-8 | 1,595 | 2.90625 | 3 | [] | no_license | INSERT INTO WordSearch(
-- 0
tweet_time,
tweet_id,
full_text,
text_range,
tweet_user_id,
tweet_user_name,
tweet_user_screen_name,
tweet_user_location,
tweet_user_description,
tweet_user_followers_count,
tweet_user_friends_count,
tweet_user_creation,
tweet_user_tw... | true |
ea39d61eaa295d462a7e6f18b1e7fbdd7d44ad60 | SQL | cardealsistemas/nutrilife_app | /src/persistence/Script de Povoamento.sql | UTF-8 | 3,966 | 2.59375 | 3 | [] | no_license | USE bd_nutrilife;
-- ***********************
-- INSERINDO CATEGORIAS --
-- ***********************
INSERT INTO CATEGORIAS(Nome) VALUES('Suplementos');
INSERT INTO CATEGORIAS(Nome) VALUES('Combos');
INSERT INTO CATEGORIAS(Nome) VALUES('Naturais');
-- **************************
-- INSERINDO SUBCATEGORIAS --
-- ********... | true |
8d3e3fe85b6040c7acdff8a477293a6bd5b0e69d | SQL | teji1998/addressbookSQLQueries | /SQLQueryAddressBook.sql | UTF-8 | 7,228 | 3.71875 | 4 | [] | no_license | /*UC1*/
--creating Address Book database
create database Address_Book_Service;
--using the database
use Address_Book_Service;
/*UC2*/
--creating address book table
Create table Address_Book(Id int identity(1,1) primary key,First_Name Varchar(30),Last_Name Varchar(30),
Address Varchar(50),City Varchar(50),State Varchar... | true |
778811267245ddea8b35f78dd6f3101c6426b2c0 | SQL | google-code/aipo-fun-team | /aipo_modify/sql/add_ADJUST_PORTLET_POSGR.sql | UTF-8 | 873 | 3.453125 | 3 | [] | no_license |
CREATE TABLE eip_t_adjust (
adjust_id INTEGER NOT NULL,
owner_id INTEGER NOT NULL,
adjust_name VARCHAR (64) NOT NULL,
note text,
CREATE_DATE DATE,
UPDATE_DATE TIMESTAMP,
PRIMARY KEY (adjust_id)
);
CREATE TABLE eip_t_adjust_item (
adjust_item_id INTEGER NOT NULL,
adjust_id INTEGER NO... | true |
9d754ca595ae119ca671ce88536c8064c0e73768 | SQL | FH-Thomas-Herzog/Java | /Semester 4/20150627_hands_on_7/swe-campina-data-model-impl/src/main/resources/create-campina-schema.sql | UTF-8 | 1,666 | 3.859375 | 4 | [] | no_license | CREATE SCHEMA if not exists campina;
USE campina;
DROP TABLE IF EXISTS campina.order;
DROP TABLE IF EXISTS campina.menu_entry;
DROP TABLE IF EXISTS campina.menu;
DROP TABLE IF EXISTS campina.user;
CREATE TABLE campina.user (
id INTEGER NOT NULL AUTO_INCREMENT,
version INTEGER NOT NULL default 1,
first_nam... | true |
4739474521b7a8f6206774b95e757fdadb3d9e51 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day14/select0339.sql | UTF-8 | 191 | 2.71875 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-13T03:39:00Z' AND timestamp<'2017-11-14T03:39:00Z' AND SENSOR_ID='97f06988_0d50_4184_90bc_a8547bf53f31'
| true |
c04daf8868d3aca6cbf05e00e259d2bdb06be361 | SQL | m1nsun9/UCI_Homework_MSL | /09_sql_challenge/EmployeeSQL/queries.sql | UTF-8 | 3,997 | 4.53125 | 5 | [] | no_license | -- HW Tables
CREATE TABLE departments (
dept_no VARCHAR(225) NOT NULL,
dept_name VARCHAR(225) NOT NULL,
CONSTRAINT pk_departments PRIMARY KEY (
dept_no
)
);
CREATE TABLE dept_emp (
emp_no INT NOT NULL,
dept_no VARCHAR(225) NOT NULL
);
CREATE TABLE dept_manager (
dept_no VA... | true |
12a4ef60169f7ab46e55b67d747e7798d762d016 | SQL | KharchenkoKatia/dbis | /km61/Kharchenko_Kateryna/laboratory1.sql | UTF-8 | 9,072 | 3.828125 | 4 | [] | no_license | /*---------------------------------------------------------------------------
1.Створити схему даних з назвою – прізвище студента, у якій користувач може:
створювати таблиці
4 бали
---------------------------------------------------------------------------*/
--Код відповідь:
CREATE user kharchenko
IDENTIFIED users
... | true |
cbd0e1300f197cad4aeac847656a77ee7a460edc | SQL | ksantoshd/DWH | /Landing_zone_Table.sql | UTF-8 | 3,004 | 2.9375 | 3 | [] | no_license |
/*LANDING ZONE TABLE [ABERPORTH_LZ] FOR ABERPORTH
WHICH POPULATED DATA FORM "ABERPORTH.CSV" FORM
WEATHER_EXTERNAL DIRECTORY
*/
CREATE TABLE ABERPORTH_LZ
(
YEAR INT,
MONTH INT,
MIN_TEMP DECIMAL(5,2),
MAX_TEMP DECIMAL(5,2),
AFFECT_DAYS INT,
RAINFALL_MM DECIMAL(5,2),
SUN_HOURS DECIMAL(5,2),
E... | true |
6c8e870a65cce5b7dec2279032fa32532bb67ce0 | SQL | ssong6735/sql_basic_study | /2. 실습 - hr/4. 실습문제(JOIN).sql | UHC | 1,705 | 4.25 | 4 | [] | no_license | SELECT * FROM employees;
SELECT * FROM departments;
-- # ǽ
-- 1. employees, departments̺ INNER JOINؼ
-- first_name, department_id, department_name ȸϼ.
SELECT
A.first_name, A.department_id, B.department_name
FROM employees A, departments B
WHERE A.department_id = B.department_id
ORDER BY a.employee_id
;
-- 1... | true |
76525f4dc4cbbc01584c35b3035abcd515fbd2fd | SQL | saijnawazaki/tps | /_database/tpsdx.sql | UTF-8 | 7,048 | 2.921875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2017 at 10:39 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
2e1cb7bc68bc76776ee13dc3b230fbff16f6e33d | SQL | dgleba/flaskplayground | /251project/proj251a/docs/roles/roles3-sqlite.sql | UTF-8 | 3,733 | 2.84375 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE user (
id INTEGER NOT NULL,
first_name VARCHAR(255),
last_name VARCHAR(255),
email VARCHAR(255),
password VARCHAR(255),
active BOOLEAN,
confirmed_at DATETIME,
PRIMARY KEY (id),
UNIQUE (email),
CHECK (active IN (0, 1))
);
INSERT INTO `user` (id,first_name,last_name,emai... | true |
8eeb57195d99b651e6f0702429eaf763423e548a | SQL | demianbarry/g2p-tracker | /g2p-tracker/DBScripts/g2ptracker structure 20090508 1549.sql | UTF-8 | 8,255 | 3.265625 | 3 | [] | no_license | DROP TABLE IF EXISTS `g2p_tracker`.`audita_estados_circuitos`;
CREATE TABLE `g2p_tracker`.`audita_estados_circuitos` (
`audita_id` int(15) unsigned NOT NULL auto_increment COMMENT 'Identificación única del registro de auditorÃa',
`circuito_id` int(11) NOT NULL COMMENT 'Circuito asociado al cambio de estado',
... | true |
da87e7d1a09242129dd48fd3af2c89a0e20c0fa1 | SQL | jotlabs/php5-jotmodel | /etc/schema/category-models.sql | UTF-8 | 2,061 | 4.4375 | 4 | [] | no_license | --
-- Model: Categories
-- Decorates: ContentEnvelope
--
CREATE TABLE IF NOT EXISTS `category_collections` (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
slug VARCHAR(31) UNIQUE,
name VARCHAR(31),
weight INTEGER,
description TEXT
);
CREATE TABLE IF NOT EX... | true |
16fed83f4fe7391fcaa9b8198a6260bfbc0f7848 | SQL | 8904076/hadoop-data-warehouse-book | /ch06/6-6-mysql-create-date-dim-table.sql | UTF-8 | 336 | 3.171875 | 3 | [] | no_license | use source;
-- 建立日期维度表
create table date_dim (
date_sk int not null auto_increment primary key comment '代理键',
day date comment '日期,yyyy-mm-dd',
month tinyint comment '月份',
month_name varchar(9) comment '月份名称',
quarter tinyint comment '季度',
year smallint comment '年'
); | true |
6b96d53bc4f86cf7ce8ea30801bb7f3d943c1f54 | SQL | Jeff-Hutchins/database-exercises | /3.8.2_join_exercises.sql | UTF-8 | 4,780 | 4.625 | 5 | [] | no_license | -- 3.8.2_join_exercises.sql
use join_example_db;
select * from users;
select * from roles;
select users.name as user_name, roles.name as role_name
from users
join roles on users.role_id = roles.id;
select users.name as user_name, roles.name as role_name
from users
left join roles on users.role_id = roles.id;
selec... | true |
6f007720996f30f7cea7af5de9452eed1e21cdfa | SQL | roayahelal/sql-challange- | /Employee_SQL_Database/Employee_Database_Schema.sql | UTF-8 | 959 | 3.671875 | 4 | [] | no_license | -- DROP TABLE dept_manager; DROP TABLE dept_emp; DROP TABLE titles; DROP TABLE salaries; DROP TABLE departments; DROP TABLE employees
CREATE TABLE departments (
dept_no VARCHAR(50) NOT NULL PRIMARY KEY,
dept_name VARCHAR(50));
CREATE TABLE employees (
emp_no VARCHAR(50) NOT NULL PRIMARY KEY,
birth_date DATE,
first_na... | true |
ee48ca7bb6dd19606d2253e60da8abebcfbef63b | SQL | theboocock/OtagoGalaxy | /src/ensembl/sql/patch_58_59_c.sql | UTF-8 | 872 | 3.4375 | 3 | [
"BSD-2-Clause"
] | permissive | # patch_58_59_c.sql
#
# Title:
# Replace splicing_event.type with splicing_event.attrib_type_id
#
# Description:
# The 'type' enumeration in the splicing_event table is too terse.
# Replace it with a reference to a proper attrib_type.
# Add the new column.
ALTER TABLE splicing_event
ADD COLUMN attrib_type_id S... | true |
6b8b580b9205b46c7d2a29b2de4f5239b3104ed3 | SQL | dbauz/sugtrad | /suggestion Xfury/suggestion sd2 mangos 2799.sql | UTF-8 | 3,912 | 2.703125 | 3 | [] | no_license | -- *** Halion ***
-- Spawns
-- Halion controller
DELETE FROM creature WHERE id=40146;
INSERT INTO creature (id,map,spawnMask,phaseMask,modelid,equipment_id,position_x,position_y,position_z,orientation,spawntimesecs,spawndist,currentwaypoint,curhealth,curmana,DeathState,MovementType) VALUES
(40146, 724, 15, 1, 0, 0, 315... | true |
3cce3112c708c5a2ab7bf8566a2056f47d15d93b | SQL | Ariah-Group/Research | /db_scripts/current_mysql/5.0/tables/KC_TBL_IACUC_PROTOCOL_SUBMISSION.sql | UTF-8 | 1,279 | 3.140625 | 3 | [
"Apache-2.0",
"ECL-2.0"
] | permissive | DELIMITER /
CREATE TABLE IACUC_PROTOCOL_SUBMISSION (
IACUC_PROTOCOL_SUBMISSION_ID DECIMAL(12,0) NOT NULL,
PROTOCOL_NUMBER VARCHAR(20) NOT NULL,
SEQUENCE_NUMBER DECIMAL(4,0) NOT NULL,
VERSION_NUMBER DECIMAL(4,0),
SUBMISSION_NUMBER DECIMAL(4,0) NOT NULL,
SCHEDULE_ID VARCHAR(10),
COMMITTEE_ID V... | true |
a525d9416bafb9abb6ea889431067792a5c775eb | SQL | suhwanggyu/Detok | /db/db_client/new_ipBlack.sql | UTF-8 | 425 | 2.796875 | 3 | [
"MIT"
] | permissive | use defender2;
drop table blacklistIP;
create table blacklistIP(
defendeeName varchar(32) not null,
ip varchar(32) not null,
reporteraddress varchar(42) not null,
primary key (defendeeName, ip),
foreign key (defendeeName) references defendee(name)
);
create table tt(
defendeeName varchar(32) not null,
... | true |
1e233c40f978f68ce7e31d8df847ee308e75c4c7 | SQL | tatianagrange/documathon | /interface/create and insert in base.sql | UTF-8 | 7,479 | 3.46875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Thu Aug 28 16:26:08 2014
-- Model: New Model Version: 1.0
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';
-- ----... | true |
f98ac86408646cabb200081a7d8beb63ff2d63e1 | SQL | yannyesteban/sevian2020 | /Sincronizador.sql | UTF-8 | 2,811 | 3.828125 | 4 | [] | no_license | INSERT INTO gt._sg_users (user, pass, expiration, status, clave)
SELECT u.usuario, md5(u.clave), vencimiento, u.status, u.clave
FROM cota.cfg_usuarios as u
LEFT JOIN gt._sg_users as u2 ON u2.user = u.usuario
WHERE u2.user IS NULL;
UPDATE gt._sg_users as u2
INNER JOIN cota.cfg_usuarios as u ON u.usuario=u2.user
SET pa... | true |
a579ebc982cf7670f1d7557afb0e427c1ee803c1 | SQL | carloso0114/sql-zoo | /7_more_join_operations.sql | UTF-8 | 3,245 | 4.65625 | 5 | [
"MIT"
] | permissive | -- List the films where the yr is 1962 [Show id, title]
SELECT id, title
FROM movie
WHERE yr=1962
-- Give year of 'Citizen Kane'.
SELECT yr FROM movie WHERE title = 'Citizen Kane'
-- List all of the Star Trek movies, include the id, title and yr (all of these movies include the words Star Trek in the title). Order ... | true |
956915fc8e2326756102fba86b6142c35e39435f | SQL | lucascalixtos/JAVA_WEB_OO_SistemaRH | /rh.sql | UTF-8 | 5,112 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 24-Nov-2019 às 16:59
-- Versão do servidor: 10.4.8-MariaDB
-- versão do PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
b2c4afac1518edf213747b480a6521a5a2f8fe5e | SQL | raprapi/seatplan-tatel | /Seatplan/backupDb/New Project 20120913 1031.sql | UTF-8 | 5,860 | 3.265625 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.5.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
... | true |
182efeb85e8f45608afb4c833f9597194d0eccb1 | SQL | pinkrrr/BobuvPHP | /shop.sql | UTF-8 | 7,812 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Дек 01 2014 г., 15:58
-- Версия сервера: 5.5.25
-- Версия PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... | true |
9fef30129eaeb571c54813f0995656c93a187c45 | SQL | eye1905/laravel541 | /query.sql | UTF-8 | 843 | 3.828125 | 4 | [
"MIT"
] | permissive | -- nomor 1
select b.noNotaBeli,b.tglBeli, sum(subTotal) as total from belis b join detailbelis d on b.id=d.id_beli
where YEAR(b.tglBeli) = 2019 AND MONTH(b.tglBeli) BETWEEN 1 and 5
--no 1 zi
SELECT b.noNotaBeli, b.tglBeli, (SUM(db.subTotal)) as totale
FROM detailbelis as db inner join belis as b on db.id_beli=b.id
WH... | true |
775d82c56307989f1d7433ee77efb725ac4040ba | SQL | backtozero/xt_scripts | /awr/extr.sql | UTF-8 | 1,893 | 2.84375 | 3 | [] | no_license | prompt ************************************************
prompt *** Extract AWR data to DATA_PUMP_DIRECTORY
prompt ***
prompt *** You can create directoty for AWR data.
prompt ***
prompt *** Existing directories:
prompt ;
col dir_name for a30;
col dir_path for a150;
select directory_name as dir_name
,director... | true |
763541230eb3e3c61e6f54024de02d71f589914d | SQL | daxesh10/CS5220-bitfire | /src/main/scripts/bitfire.ddl | UTF-8 | 2,261 | 3.4375 | 3 | [] | no_license | create sequence hibernate_sequence start 1 increment 1
create table addresses (
address_id int4 not null,
USD int default 0 not null,
address varchar(255),
bitcoins int default 0 not null,
is_primay boolean,
label varchar(255),
wallet_id varchar(255) not null... | true |
a7cfedeae323eb23a596340d096ac9299e29e768 | SQL | Megantee1805/oop-group-3 | /documents/megan-flask/database/vendor.sql | UTF-8 | 695 | 2.765625 | 3 | [] | no_license | --
-- File generated with SQLiteStudio v3.2.1 on Wed Dec 5 22:57:47 2018
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: Vendors
DROP TABLE IF EXISTS Vendors;
CREATE TABLE Vendors (
Name TEXT PRIMARY KEY,
Menu INTEGER
);
INSERT INTO Vendors (
Name, Menu
)
... | true |
bdfb4b6adb51e17f28054e424a72180f2dd44ced | SQL | piltatnik/CustomReports | /Doc/schema/series.sql | WINDOWS-1251 | 2,744 | 2.5625 | 3 | [] | no_license | CREATE TABLE series (
id_ser NUMBER(2) PRIMARY KEY,
ser_name VARCHAR2(30) NOT NULL,
amount number)
insert all
into series(id_ser,ser_name,amount) values(10,' ',0)
into series(id_ser,ser_name,amount) values(11,' 2',620)
into series(id_ser,ser_name,amount) va... | true |
66c0067291e7490d5760a8d8b29d5a833f8ea709 | SQL | Haque-Farhana/Flight-Reservation-System | /springweb.sql | UTF-8 | 1,528 | 3.625 | 4 | [] | no_license | use springweb;
CREATE TABLE `reservation` (
`user_id` varchar(20),
`confirmation_no` varchar(20),
`flight_no` varchar(20),
`no_of_seat` varchar(20),
`amount` double,
PRIMARY KEY (`confirmation_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
use springweb;
CREATE TABLE `routing` (
`origin` varchar(20),
`dest... | true |
732e216594341b39ea5bb3e8408c61a51a1c0adb | SQL | twilson123/MySql | /Farmer's Market Final/ddl.sql | UTF-8 | 1,195 | 2.90625 | 3 | [] | no_license | CREATE TABLE products(
itemID int PRIMARY KEY NOT NULL,
itemName text (45) NOT NULL,
itemPrice double NOT NULL
);
CREATE TABLE customer(
userID int PRIMARY KEY NOT NULL,
userName varchar (45) NOT NULL,
userPw varchar (45) NOT NULL,
userEmail varchar (50) NOT NULL
);
CREATE TABLE display (
statusID... | true |
ec4c7104c83090f292b0b73f53b08bec268ef6ec | SQL | MagnusLj/proj-jsramverk-api | /db/migrate.sql | UTF-8 | 501 | 2.921875 | 3 | [] | no_license | DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS stuff;
CREATE TABLE IF NOT EXISTS users (
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(60) NOT NULL,
day INT(3) NOT NULL,
month VARCHAR(12) NOT NULL,
year INT(5) NOT NULL,
apples INT(5),
pears INT(5),
bana... | true |
69539272520f9c297f201debffd0a53ed0a99a50 | SQL | louisryan/Twitter_Analysis | /twitter_schema.sql | UTF-8 | 6,563 | 3.359375 | 3 | [] | no_license |
-- ----------------------------
-- Table structure for `hashtag`
-- ----------------------------
DROP TABLE IF EXISTS `hashtag`;
CREATE TABLE `hashtag` (
`hashtag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tweet_id` varchar(20) NOT NULL,
`text` varchar(145) NOT NULL,
`index_start` tinyint(3) unsigned NOT ... | true |
eb5a5f02a43f0884131293e531709a541ef10d9d | SQL | El-E-N/DirectumLab-2021-Vakhrushev_EN | /SQL module/Block3/02_task/practice/2_5.sql | WINDOWS-1251 | 520 | 3.4375 | 3 | [] | no_license | use Labstudy;
--a
select * from Customers
where
city = ''
or city = '';
--0.004 sec
select * from Customers
where
city in ('', '');
--0.003 sec
--
--b
select * from SalesPeople
where
comm >= 0.1
and comm <= 0.12;
select * from SalesPeople
where comm between 0.1 and 0.12;
--c
select * from Customers
... | true |
dab36b3e3f835e254bf8f058b56853fa88d6b976 | SQL | oneeyedjames/gnosis | /src/assets/sql/view.series_module.sql | UTF-8 | 186 | 3.171875 | 3 | [] | no_license | CREATE VIEW `series_module` AS
SELECT DISTINCT `sc`.`series_id`, `cm`.`module_id`
FROM `series_course` AS `sc`
INNER JOIN `course_module` AS `cm`
ON `cm`.`course_id` = `sc`.`course_id`;
| true |
6633ff780442baa1908a0b618493bd37e7982a7c | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/t_dataset_archive_state_name.sql | UTF-8 | 840 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | --
-- Name: t_dataset_archive_state_name; Type: TABLE; Schema: public; Owner: d3l243
--
CREATE TABLE public.t_dataset_archive_state_name (
archive_state_id integer NOT NULL,
archive_state public.citext,
comment public.citext
);
ALTER TABLE public.t_dataset_archive_state_name OWNER TO d3l243;
... | true |
ec435330a31b8b8a3b7de45c508af466bd4b29f0 | SQL | sdss/sdssdb | /schema/sdss5db/catalogdb/sdssPhotoObj/dr13/sdss_dr13_photoobj_index.sql | UTF-8 | 882 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | /*
indices for catalogdb tables, to be run after bulk uploads
*/
-- Indices
CREATE INDEX CONCURRENTLY ON catalogdb.sdss_dr13_photoobj (q3c_ang2ipix(ra, dec));
CLUSTER sdss_dr13_photoobj_q3c_ang2ipix_idx ON catalogdb.sdss_dr13_photoobj;
VACUUM ANALYZE catalogdb.sdss_dr13_photoobj;
CREATE INDEX CONCURRENTLY ON catalo... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.