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
1abef75b7b9f733fca4d9b511b711288059a9b96
SQL
mainapi/dashboard
/src/main/resources/db/changelog/db.changelog-0.1.0.sql
UTF-8
626
3.140625
3
[]
no_license
--liquibase formatted sql --changeset dianw:0001 --comment: create app table create table mainapi_app ( id bigint(20), created_by varchar(256) not null, created_date datetime not null, last_modified_by varchar(256), last_modified_date datetime, app_name varchar(128) not null, business_address varchar(204...
true
b2019fae371bb6cc1d5a6e4354a4290960cce28d
SQL
Akshay2996/MentorOnDemand
/DataBase/Dump20191004/testdb_training.sql
UTF-8
3,198
3.109375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64) -- -- Host: localhost Database: testdb -- ------------------------------------------------------ -- Server version 5.7.26-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
true
763e39c04c57c79b1204b5cd6420b1559c4da419
SQL
sebastian-raubach/frickl-web-server
/src/main/resources/raubach/fricklweb/server/util/database/migration/V1.20.02.23__update.sql
UTF-8
160
2.703125
3
[ "Apache-2.0" ]
permissive
ALTER TABLE `images` ADD COLUMN `is_public` TINYINT(1) DEFAULT 0 AFTER `album_id`; ALTER TABLE `images` ADD INDEX `images_is_public` (`is_public`) USING BTREE;
true
f4de86aa1ef7b367a62424ca4d6fea8d6000ea3e
SQL
ElsaHilftDigital/main
/backend/src/main/resources/db/migrations/20200404-1549-add-purchase-applications.sql
UTF-8
201
2.953125
3
[]
no_license
create table purchase_applications ( purchase_id bigint not null references purchase (id), volunteer_id bigint not null references volunteer (id), primary key (purchase_id, volunteer_id) );
true
e11d7e526d58dae068529d4456812d716e93ef8c
SQL
datduyng/jefferson-viewing-center-ims
/assignment/assignment04/invoiceDB.sql
UTF-8
11,076
3.34375
3
[]
no_license
----------------------------------------------- -- MySQL -- @ Author Dat Nguyen and Reid Stagemeyer -- Host: localhost Database: datduyn -- ------------------------------------------------------ -- Server version 5.1.57 -- Uncomment these piece to test them locally -- use rstagemeyer; -- use datduyn; -- use im...
true
c150b00c7a76d924539807fa0049d8cc3e3d663a
SQL
JLangLadurner/JAVA_Final_School_Project_Annina_Christina_Judith
/schoolTest1.sql
UTF-8
4,888
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 26, 2019 at 07:45 PM -- Server version: 10.1.39-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
13aa7b998da63e6425ae53a06f2b7a41bc167769
SQL
Lohith-Aswathappa/LeetCode
/replace-employee-id-with-the-unique-identifier/replace-employee-id-with-the-unique-identifier.sql
UTF-8
131
2.921875
3
[]
no_license
# Write your MySQL query statement below ​ select eu.unique_id, e.name from employees e left join employeeUNI eu on eu.id = e.id
true
ad221b2af9cfe6515c7dbe58bb99a4869e214155
SQL
naveenkod22/MySQL
/Query/12-Desiginig Databases/12.29 altering primary key and foreigen key constraints.sql
UTF-8
373
3.6875
4
[ "MIT" ]
permissive
-- 12.29 altering primary key and foreigen key constraints alter table orders add primary key(order_id), drop primary key, -- column names not specifed drop foreign key orders_ibfk_4, drop foreign key orders_ibfk_5, add foreign key fk_orders_customers(customer_id) references customers (customer_id) ...
true
5c076ce9eea048f48591afed5de3cff87c4e891f
SQL
DSIS15/IS2015
/Grupo 2/Documentos/Base de Datos/Script 15 abril (sql estandar).sql
UTF-8
7,681
3.1875
3
[]
no_license
CREATE TABLE medico ( id_medico NUMERIC NOT NULL, nombre_medico VARCHAR(25) NOT NULL, priimer_apellido_medico VARCHAR(15) NOT NULL, medico_segundo_apellido VARCHAR(15) NOT NULL, fecha_ingreso VARCHAR(11) NOT NULL, estado NU...
true
cc42d803e58c5a53eb271528d283b6dede65dfcd
SQL
fokko-datafold/dbt-beers
/models/example/orders.sql
UTF-8
1,426
3.75
4
[]
no_license
{{ config( materialized='incremental', unique_key='order_no', persist_docs={"relation": true, "columns": true} ) }} -- We'll fake some data, since this is an example repository -- we want to make sure that we continue to generate data up -- to today WITH generated_orders AS ( {% for day_ago in range(3...
true
0100c44418405adce273136bbfa916a3232f79e4
SQL
kongq1983/sharding-jdbc-4
/sql/order.sql
UTF-8
4,198
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `sharding-test` DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci; CREATE TABLE `t_order_202105` ( `id` varchar(32) NOT NULL, `user_id` varchar(32) NOT NULL, `code` varchar(32) DEFAULT NULL, `sale_date` date NOT NULL, `create_time` timestamp NOT NULL DEFAULT C...
true
49d8e018373ea1422db4f676f37c642095661351
SQL
Freetable/network-services
/sql/add_file_to_playlist.sql
UTF-8
647
3.5
4
[ "CC-BY-4.0" ]
permissive
DELIMITER $$ DROP PROCEDURE IF EXISTS add_file_to_playlist$$ CREATE PROCEDURE add_file_to_playlist (uid CHAR(36), ssessionid CHAR(36), fid CHAR(36), fn INT UNSIGNED) BEGIN SET @valid = ( SELECT COUNT(*) FROM users WHERE WWUSERID = uid AND sessionid = ssessionid); IF @valid > 0 THEN SET @current_playlist = ( SELECT pl...
true
dc85d383ed1e1bff84932bb09d5819690fc88944
SQL
dystudio/Adnc
/doc/adnc_cus.sql
UTF-8
2,705
3.46875
3
[ "MIT" ]
permissive
/* Navicat MariaDB Data Transfer Source Server : 193.112.75.77 Source Server Version : 100504 Source Host : 193.112.75.77:13308 Source Database : adnc_cus Target Server Type : MariaDB Target Server Version : 100504 File Encoding : 65001 Date: 2020-10-15 14:54:19 */ SET FOREIGN_KEY...
true
6d4eb7f85eb6380839f445c61a2310fe93c49ea1
SQL
Jetsparrow/karmabot
/karma.sql
UTF-8
1,321
3.75
4
[]
no_license
-- Example JetKarmaBot database -- (taken from mysqldump) DROP TABLE IF EXISTS `awardtype`; CREATE TABLE `awardtype` ( `awardtypeid` tinyint(3) NOT NULL PRIMARY KEY, `commandname` varchar(35) NOT NULL UNIQUE, `name` varchar(32) NOT NULL, `symbol` varchar(16) NOT NULL, `description` text NOT NULL ); LOCK TA...
true
9512150fa16257b515fce449809ee66788b44b44
SQL
whomikedao/SQL
/students.sql
UTF-8
2,602
3.65625
4
[]
no_license
-- INSERT INTO student VALUES ( -- DEFAULT, 'Michael', 'www.google.com', 'whomikedao', 2, 'F', '1962-04-13', FALSE -- ); -- INSERT INTO student (name, graduated) VALUES ( -- 'dingdong', FALSE -- ); -- INSERT INTO student (name, github_username) VALUES ( -- 'chingchong', 'whomikedao' -- ); -- UPDATE stu...
true
40bafc87abd2f99bb3c64faabd7050c928037e63
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Constraints/KLS_TEX_PD_NonFK.sql
UTF-8
396
3.21875
3
[]
no_license
-- -- Non Foreign Key Constraints for Table KLS_TEX_PD -- ALTER TABLE MASTER.KLS_TEX_PD ADD ( CHECK ("PLATTARIF_ID" IS NOT NULL) DISABLE NOVALIDATE); ALTER TABLE MASTER.KLS_TEX_PD ADD ( CHECK ("TEX_PD_NAME" IS NOT NULL) DISABLE NOVALIDATE); ALTER TABLE MASTER.KLS_TEX_PD ADD ( CONSTRAINT TEX_PD_PK PRIMA...
true
e99a33d96cc777215ce8971b64dde3909da73db6
SQL
lgcarrier/AFW
/5.2.3/Database/Constraints/AFW_25_PARMT_PUBLC_TRAVL_FK1.sql
UTF-8
216
2.71875
3
[ "MIT" ]
permissive
SET DEFINE OFF; ALTER TABLE AFW_25_PARMT_PUBLC_TRAVL ADD ( CONSTRAINT AFW_25_PARMT_PUBLC_TRAVL_FK1 FOREIGN KEY (REF_PUBLC_TRAVL) REFERENCES AFW_25_PUBLC_TRAVL (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
true
b08a89173a9b0cc6f5983f208a72ae05f1658f57
SQL
seokhoyoun/Database
/수업DAY10.sql
UTF-8
15,031
4.46875
4
[]
no_license
-- DAY10 DDL -- 데이터무결성 제약조건 CONSTRAINTS -- 1. NOT NULL 사용 -- 컬럼에 값이 반드시 기록되어야할때 사용한다. -- EX) 웹에서 필수입력항목 -- 컬럼 레벨에서만 설정할 수 있음 CREATE TABLE TESTNN ( NNID NUMBER(5) NOT NULL, -- 컬럼레벨 NN_NAME VARCHAR2(20) ); -- 기록테스트 INSERT INTO TESTNN (NNID,NN_NAME) VALUES (NULL,NULL ); -- ERROR : NNID에 NOT NULL 제약조건에 위배 INSERT INTO T...
true
1c71722b09c3ecbc60a2a5a78bc1b4f0390a76e7
SQL
bellmit/origin
/family_order/sql/EMPINTEGRAL_RULE/SEL_EMP_CHKBHTRADE10D_BYID.sql
UTF-8
510
2.75
3
[]
no_license
--IS_CACHE=N SELECT D.DEPART_KIND_CODE 部门类型, TO_CHAR(A.ACCEPT_DATE, 'YYYYMM') 受理月份,A.TRADE_DEPART_ID 受理部门,a.trade_staff_id 受理工号,A.TRADE_ID 台账标识 FROM UCR_CRM1.TF_BH_TRADE A, TD_M_DEPART D WHERE A.TRADE_TYPE_CODE = :TRADE_TYPE_CODE ---'142' AND TRUNC(A.ACCEPT_DATE) BETWEEN TRUNC(SYSDATE - 10) AND TRUNC(SYSDATE) ...
true
ccc10faa5dd404b4813a2181190483f972c01885
SQL
erik-burger/real-ims-project
/database/create_index.sql
UTF-8
183
2.53125
3
[]
no_license
create index index_f_name on patient (first_name); create index index_l_name on patient (last_name); create index index_test_date on test (test_date); SHOW INDEXES FROM test;
true
435108c1524311e94ce9a7a9eaa98a5dc04aa98a
SQL
bailiang806/brown
/happydriving-server/src/main/resources/scripts/create_table_student_schedule.sql
UTF-8
718
3.484375
3
[]
no_license
CREATE TABLE `student_schedule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) DEFAULT NULL, `coach_schedule_id` int(11) DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK_student_schedule_user_id` (`user_id`), KEY `FK_student_sch...
true
657b797dea645f81ffdb9705f172bc3623734e09
SQL
mghhrn/spring-playground
/src/main/resources/schema.sql
UTF-8
432
2.609375
3
[]
no_license
create table student ( id int8 primary key, first_name varchar, national_id int8 ); insert into student values (1, 'Mehdi', '23524'); insert into student values (2, 'Hasan', '5898348'); create table invoice ( id int8 primary key, customer_name varchar, status varchar, is_warning boolean, ...
true
d7c5ac20a13723453acac894fcec8206d9e9700f
SQL
kmieluu/DataRepresentation
/Big Project/bigprojectdatabases.sql
UTF-8
2,309
3.640625
4
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Table structure for table `dogs` -- DROP TABLE IF EXISTS `dogs`; CREATE TABLE `dogs` ( IKCReg varchar(100) NOT NULL, RegNum int(20) NOT NULL, age int (10) NOT NULL, breed varchar(100) NOT NULL, pr...
true
19736dbe838fed3d8ecf28dcb7e87ed2a75138c3
SQL
MAhmoud2527/Fitness_Gym
/fitness_gym.sql
UTF-8
8,520
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 08, 2021 at 09:58 AM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
b0b3fc45175505099ab9c683cfedd06b078b5f1f
SQL
michaelholst/exchange
/conf/cassandra.ddl
UTF-8
269
2.703125
3
[]
no_license
CREATE KEYSPACE exchangerate with strategy_class = SimpleStrategy and strategy_options:replication_factor=1; USE exchangerate; CREATE TABLE exchangerate (id varchar PRIMARY KEY, date varchar, currency varchar, rate double); CREATE INDEX ON exchangerate (currency);
true
2317393040c6b1474c3c1ee9588a8d08113853e2
SQL
charles-wangkai/leetcode
/calculate-the-influence-of-each-salesperson.sql
UTF-8
249
4.09375
4
[]
no_license
SELECT p.salesperson_id, p.name, coalesce(sum(s.price), 0) AS total FROM Sales s JOIN Customer c ON c.customer_id = s.customer_id RIGHT OUTER JOIN Salesperson p ON p.salesperson_id = c.salesperson_id GROUP BY p.salesperson_id, p.name
true
60d87253168434c676a5c69d1d8cc9d0ec445e7d
SQL
bluedaemondev/countERP
/QUERYS/creation1.sql
UTF-8
1,018
3.296875
3
[]
no_license
CREATE TABLE uom( id INT PRIMARY KEY IDENTITY(1,1), name varchar(256) NOT NULL default 'prd_uom', descr varchar(64) NOT NULL, date_created datetime default GETDATE(), active bit default 1 ) CREATE TABLE product_category( id INT PRIMARY KEY IDENTITY(1,1), name varchar(256) NOT NULL default 'prd_categ', descr var...
true
59822da7f34375ad26d60f5573629d579cad566f
SQL
DingS-Kai/lesson-parent
/userManagerImpl/src/main/resources/SQL/autolesson2.sql
UTF-8
2,984,005
2.953125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : lhz Source Server Version : 50726 Source Host : localhost:3306 Source Database : autolesson Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2019-12-18 18:01:52 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
d59c60fdbe28d6f5c743a2f601d1cc90d186380b
SQL
hbwang518/llp
/sqlProgram/20110519TC.sql
GB18030
809
2.90625
3
[]
no_license
select * from environment where plot like 'TC%' order by altitudeGPS select * from shrubAndGrass where plot like 'TC%' and species not in (select species from shrubAndGrass where plot like 'TC%' and plot != 'TC17') select * from shrubAndGrass where species = 'Ĥ' select * from shrubAndGrass where species = 'ί' select *...
true
d90746d0efcae11a231257acac202cd5540b3cd4
SQL
tung0101/learning.nentang.vn-mysql
/mysql/db/nentang_learning_mysql_example.sql
UTF-8
2,475
3.265625
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.11-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- -----------------------------------------------...
true
8742ce711fb6e0832685acb6b55c8f4a63b38cba
SQL
bellmit/origin
/family_order/sql/.svn/pristine/c6/c6e1c1cbaaced8ea7212e3e000d36a72e1620d07.svn-base
UTF-8
2,029
3.609375
4
[]
no_license
--IS CACHE=Y SELECT * FROM ( SELECT D.DEPART_KIND_CODE 部门类型, TO_CHAR(A.ACCEPT_DATE, 'YYYYMM') 受理月份,A.TRADE_ID 台账标识 FROM ucr_crm1.TF_BH_TRADE A,ucr_crm1.TF_B_TRADE_PLATSVC B,TF_F_USER_PLATSVC C,TD_M_DEPART D,td_m_staff E WHERE A.TRADE_ID = B.TRADE_ID AND C.USER_ID = TO_NUMBER(:USER_ID) AND A.TRADE_T...
true
955cd7a80747ad76459968b36508628381cfcadf
SQL
cssat/sql_dev
/ospi/aggregateMonthly/10 Insert into Enrollment Fact.sql
UTF-8
2,056
2.90625
3
[]
no_license
truncate table ospi.enrollment_fact insert into ospi.enrollment_fact SELECT [int_researchID] ,osp.[DistrictID] ,d.DistrictName ,osp.[SchoolCode] ,sc.SchoolName ,[DateEnrolledInDistrict] ,[DateExitedFromDistrict] ,[DateEnrolledInSchool] ,[DateExitedFromSchool] ,[Enro...
true
e9be8f4770206b47ecc028d5921abb14d33b3ed5
SQL
evrimulgen/Notion
/src/main/resources/db/migration/V1.0.4.0__Connectors.sql
UTF-8
566
3.46875
3
[ "BSD-3-Clause" ]
permissive
CREATE TABLE CONNECTOR ( ConnectorKey INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY, Name varchar(255) NOT NULL UNIQUE, Description varchar(255), QueryPoolKey INT NOT NULL , QueryDeviceKey INT NOT NULL, DestinationPoolKey INT NOT NULL, CONSTRAINT CONNECTOR_fk1 foreign key (QueryPoolKey) references ...
true
a255469fa17eb5be093d05c4f899b4cb46d318d5
SQL
graphile/graphile-engine
/packages/postgraphile-core/__tests__/queries/base/empty-array.sql
UTF-8
1,037
3.140625
3
[ "MIT" ]
permissive
with __local_0__ as ( select to_json( ( json_build_object( '__identifiers'::text, json_build_array(__local_1__."id"), 'id'::text, (__local_1__."id"), 'name'::text, (__local_1__."person_full_name"), 'aliases'::text, ( case when (__loca...
true
39ba8cce3754c4dd45e086378d09baa184996475
SQL
senwa/TWProject
/Cake.sql
UTF-8
3,208
3.671875
4
[]
no_license
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'; CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `mydb` ; -- -------...
true
a1818e75f67c30853162675ba810908f3c8a8522
SQL
zhangjunwen/think-admin
/database.sql
UTF-8
3,422
3.234375
3
[ "Apache-2.0" ]
permissive
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.7.11 : Database - market_app ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHE...
true
d11ae4a684f08bddcf8a34545f53b93c3be8a779
SQL
warncke/immutable-commerce
/sql/immutable/01-address.sql
UTF-8
390
2.546875
3
[ "MIT" ]
permissive
CREATE TABLE `address` ( `addressId` binary(16) NOT NULL, `accountId` binary(16) DEFAULT NULL, `sessionId` binary(16) NOT NULL, `addressData` mediumtext NOT NULL, `addressType` varchar(255) DEFAULT NULL, `addressCreateTime` datetime(6) NOT NULL, PRIMARY KEY (`addressId`), KEY `accountId` (`accountId`), ...
true
184f98daf5f7be02f84204ad8ba100c869ab8da7
SQL
UcgajjarPDI/Nicepak-PIMS
/PDI_SALESTRACING_DEV/dbo/Functions/TryConvertDate.sql
UTF-8
177
2.78125
3
[]
no_license
CREATE FUNCTION dbo.TryConvertDate ( @value varchar(max) ) RETURNS date AS BEGIN RETURN (SELECT CONVERT(date, CASE WHEN ISDATE(@value) = 1 THEN @value END) ); END
true
c0d5471a28a00f9974dc16509942b24a925c1202
SQL
JelF/rest-psql-web-server
/migrations/0218010223090000_create_users.sql
UTF-8
247
3.0625
3
[ "MIT" ]
permissive
CREATE TYPE data.user_role AS ENUM ('user', 'admin'); CREATE TABLE data.users ( id SERIAL, email TEXT NOT NULL CONSTRAINT valid_email CHECK (email LIKE '%@%.%'), password_hash TEXT NOT NULL, role data.user_role NOT NULL DEFAULT 'user' );
true
674ddf6e1c36bb7b270b14d19e57ebe407b011b3
SQL
wsdigital/jb_open_source_projects
/db.sql
ISO-8859-1
6,637
3.34375
3
[]
no_license
-- -------------------------------------------------------- -- -- Estrutura da tabela `blog_menu` -- CREATE TABLE IF NOT EXISTS `blog_menu` ( `id` int(11) NOT NULL AUTO_INCREMENT, `titulo` varchar(255) NOT NULL, `autor` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INC...
true
bbff6a3ea9ce28b89c41bcc16de25eb843c68dd9
SQL
chrisl3wis/PantryPal
/db_backup_2018-11-29/db_backup_2018-11-29.sql
UTF-8
6,556
3.796875
4
[]
no_license
create table diets ( ID int auto_increment primary key, diet varchar(22) null ); create table errorLogs ( id int auto_increment primary key, email varchar(64) null, errorlog mediumtext null, errornumber varchar(20) null, errorDateTime datetime null ) engine = MyI...
true
a63aaa037665a685326d9f8dbdf0ded5460b7202
SQL
m-shahrestani/Ghanari
/SQL Files/queries/send_message.sql
UTF-8
1,659
2.8125
3
[]
no_license
insert into message(type, ava_content, text_content, sender, receiver, send_date) select 1, null,'text message', 'aak', 'rak', now() where 'aak' not in (select blocked from blocks where blocker = 'rak'); insert into message(type, ava_content, text_content, sender, receiver, send_date) select 1, null,'text message', 'g...
true
9bc631c69e82b27b0f58d5dd55bbfaf143221e3c
SQL
cooltiger/testnets
/test-faucet/config/faucet.sql
UTF-8
1,442
3.296875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost-postgre Source Server Type : PostgreSQL Source Server Version : 90602 Source Host : localhost:5432 Source Catalog : test-faucet Source Schema : public Target Server Type : PostgreSQL Target Server Version : 9060...
true
3af1dc836dbc3f80bf068b592dd59fed507d7edc
SQL
crh/escidoc-core-1.3
/common/src/main/resources/sql/postgres/aa/mpdl/aa.init.roles.user-account-administrator.sql
UTF-8
9,092
2.984375
3
[]
no_license
/** IF CHANGING THE POLICY, PLEASE ADAPT THIS SECTION!!! <section> <title>UserAccountAdministrator</title> <para>internal id: escidoc:role-user-account-administrator</para> <para>A UserAccountAdministrator is allowed to: <itemizedlist mark="opencircle" spacing="compa...
true
02664a86155135ec7c2b266e869d0c48c2fd7d00
SQL
JAINAJ565/Blue-Horizon-Infotech
/bluehorizon.sql
UTF-8
2,712
3.21875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 29, 2021 at 06:59 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
07907a6533a8a28e1465ffcde1cb19957e437df0
SQL
JesusGarciaP/Programacion_Web
/ProyectoWebFinal + informe/ProyectoWeb/pediatria.sql
UTF-8
681
2.9375
3
[]
no_license
create database pediatria; use pediatria; create table users( idUser int auto_increment primary key, FirstName varchar(45) not null, LastName varchar(45) not null, username varchar(45) not null, email varchar(255) not null, password char(40) not null, tipo char(6) ); create table products( idProduct int auto_increme...
true
009453545164b72a8d583373937afa85c9351be8
SQL
bbarkji-programer/Today-what-I-have-learned
/1_Java/ch21_jdbc/bin/com/tj/ex03insert/ex.sql
UTF-8
459
2.828125
3
[]
no_license
SELECT * FROM DEPT WHERE DEPTNO=30; INSERT INTO DEPT VALUES (60,'MARKETING','SEOUL'); COMMIT; SELECT COUNT(*) FROM DEPT WHERE DEPTNO=30; UPDATE DEPT SET DNAME='MARKETING', LOC='SEOUL' WHERE DEPTNO=60; ROLLBACK; DELETE FROM DEPT WHERE DEPTNO=60; SELECT COUNT(*) FROM DEPT WHERE DEPTNO=70; SELECT * FROM DEPT; rollback; S...
true
b82d763bde9395e91115944aa5547204d546d017
SQL
BackupTheBerlios/x-rai-svn
/head/scripts/xrai.sql
UTF-8
1,739
3.703125
4
[]
no_license
# # SQL file for X-Rai # (c) 2005 B. Piwowarski # # -------------------------------------------------------- # # Keywords table: contain information on selected keywords # CREATE TABLE IF NOT EXISTS keywords ( id_pool smallint(3) unsigned NOT NULL default '0', color varchar(6) NOT NULL default '', keywords t...
true
bc0999458c2cc8eeba777fab9e5eb694d864648c
SQL
TarparaDhruv/Emart
/Final Report/emart (1).sql
UTF-8
10,682
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 09, 2015 at 11:45 AM -- Server version: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
7d571f1af58d1420fc1e0a13e4c1775330f8786a
SQL
daniiel/cursos
/Oracle 11g - Introduction to SQL/courselabs/plpu/code_ex/code_07_13_s.sql
UTF-8
490
3.140625
3
[]
no_license
CREATE TABLE usage (card_id NUMBER, loc NUMBER) / CREATE TABLE txn (acc_id NUMBER, amount NUMBER) / CREATE OR REPLACE PROCEDURE log_usage (p_card_id NUMBER, p_loc NUMBER) IS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN INSERT INTO usage VALUES (p_card_id, p_loc); COMMIT; END log_usage; / CREATE OR REPLACE PROCEDURE b...
true
23e9151311435d32ecf36f313889989a319fc8c0
SQL
tamagochy/tamagotchi-basic-mechanics
/src/main/resources/db/migration/V6__insert-new-data.sql
UTF-8
2,203
2.6875
3
[]
no_license
INSERT INTO INDICATORS(ID, CODE, ROOM_CODE, DESCRIPTION) VALUES (1, 'health', 'hospital', 'Показатель здоровья питомца'), (2, 'hunger', 'kitchen', 'Показатель сытости питомца'), (3, 'rest', 'bedroom', 'Показатель отдыха питомца'), (4, 'mood', 'playRoom', 'Показатель настроения питомца'); -- Игры I...
true
1233e4f257e0c18c860ac2511f94951224095209
SQL
snafua/snafua.github.io
/source/procedures/_SMH/_SMH.AdditionalCMSTestsLoad.sql
UTF-8
590
2.5625
3
[]
no_license
create procedure "_SMH"."AdditionalCMSTestsLoad"( in @VesselId smallint, in @EquipmentId integer, in @TestResultId integer, in @Sort long varchar default '7 DESC', in @MaxResults integer default null ) result( "VesselId" smallint, "EquipmentId" integer, "TestResultId" integer, "VesselName" char(80)...
true
74046bd1dc878fd5fb2ce3d2b4a2dc0e82c2b5a7
SQL
amtepradnya/hrManagement
/advids_app (10).sql
UTF-8
12,042
3.03125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 21, 2020 at 10:47 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
5459acc3e4177ae90108091d4256704ca74f3678
SQL
nht178/EnglishCenterManagementSystem
/StoreProcedure/21_chuongtrinhdenghi.sql
UTF-8
1,761
3.390625
3
[]
no_license
create procedure CHUONG_TRINH_HOC_DENGHI ( @MaChiTietTXL varchar(15), @MaHV varchar(15) ) as if (select CHI_TIET_THI_XL.ChuongTrinhMongMuon as MaCTMuonHoc from CHI_TIET_THI_XL where CHI_TIET_THI_XL.MaThiXepLop = @MaChiTietTXL and CHI_TIET_THI_XL.MaHV = @MaHV) != '' select Table_CacChuongTrinhPhuHop.MaCTHoc as Ma...
true
e97798d90a5e967be1e43178f0f611581e314d2e
SQL
pmosoft/fframe
/src/main/java/net/pmosoft/fframe/dams/DataArchMariadbSchema.sql
UTF-8
35,467
3.234375
3
[]
no_license
/* * 테이블 작성 및 생성은 스크립트로 하고 * * 엑셀이나 디비접속으로 systable 정보를 읽어서 약어, 인포타입, 표준용어 추출 및 * * 테이블 스키마 품질 지적 및 가이드 * * * 표준용어 혹은 약어 정보 검색 기능. public or private. * * 표준용어 분석 * * 웹버젼과 어플버젼 * * QA용 * * * 프로젝트 거버넌스 툴 * * * 정합성 체크 * */ ; SELECT * FROM INFORMATION_SCHEM...
true
7f92362fb786d38b06ca1f081198196a381a4fdb
SQL
KateKhodko/forestry
/src/main/resources/db.changelog/changes/changes/v1/create-table-forestry.sql
UTF-8
339
3.1875
3
[]
no_license
CREATE TABLE forestry ( id BIGSERIAL NOT NULL PRIMARY KEY , name varchar(64), forester_id BIGSERIAL, village_id BIGSERIAL, CONSTRAINT forester_id_fk FOREIGN KEY (forester_id) REFERENCES forester (id) ON DELETE CASCADE, CONSTRAINT village_id_fk FOREIGN KEY (village_id) REFERENCES village (id) ON...
true
8c6dd62bd2c71bfe6b5c7092d3b6cd9a20392417
SQL
tracktopell/ABM
/model/sql/CREATE_SCHEMA_TEST.MySQL.SQL
UTF-8
1,162
3.46875
3
[]
no_license
DROP DATABASE IF EXISTS APTBLCMGR_DB_TEST; CREATE DATABASE APTBLCMGR_DB_TEST; USE APTBLCMGR_DB_TEST; CREATE TABLE USUARIO( EMAIL VARCHAR(64) NOT NULL, NOMBRE VARCHAR(128) NOT NULL, PASSWORD VARCHAR(255) NOT NULL, DEPARTAMENTO VARCHAR(8) NOT NULL, HABILITADO INTEGER(1) NOT NULL, SALDO DOUBLE NOT NULL, PRIMARY KE...
true
099b6d2568d0e74712e15203f76b7b5e14c43c7d
SQL
MaDFeDoT/BD
/lab3/insert_procedure.sql
UTF-8
1,961
3.65625
4
[]
no_license
create procedure insert_items (item_ID integer, contracts_ID integer, name varchar(50), cost integer) as begin insert into items(item_ID, contract_ID, name, cost) values (:item_ID, :contracts_ID, :name, :cost); end; create procedure insert_history_cell (ID integer, cell_number integer, acsess_type integer, date_a...
true
656b78fc0c9b66507b5b918f4e18fa9a56197d7c
SQL
NemanjaSimic/Vodovod-Servis
/Template/Schema objects/Schemas/dbo/Tables/Keys/EKIPA_FK.sql
UTF-8
279
2.921875
3
[]
no_license
ALTER TABLE EKIPA ADD CONSTRAINT EKIPA_RADNI_NALOG_FK FOREIGN KEY (RADNI_NALOG_ID_RADNAL, RADNI_NALOG_PRIMA_JMBG_ZAP, RADNI_NALOG_PRIMA_JMBG_KOR, RADNI_NALOG_PRIMA_ID_KVAR) REFERENCES RADNI_NALOG (ID_RADNAL , PRIMA_JMBG_ZAP , PRIMA_JMBG_KOR , PRIMA_ID_KVAR)
true
b4c3d968268828c9272b96963b780ee1a420bb04
SQL
ToborTheGreat/Repository01
/toolkit.dim_assembly.sql
UTF-8
953
2.703125
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = toolkit, pg_catalog; ALTER TABLE ONLY toolkit.dim_assembly DROP CO...
true
f41a4f8c1b8e1fdd633553f5bdf44edf2cf9107c
SQL
anatole72/sql_scripts
/admin_scripts/scripts/buf_chk.sql
UTF-8
491
2.828125
3
[]
no_license
REM REM Report that displays the database block buffer cache summary REM REM NOTES: REM 1. The script should be executed by SYS. REM 2. The system script CATPARR.SQL must be executed before. REM @_BEGIN @_TITLE "BUFFER CACHE SUMMARY" COLUMN status FORMAT A12 SELECT DECODE(state, 0, 'Free', ...
true
41db792153be7ca9152c80b8cb5a156018883755
SQL
Vedia-JerezDaniel/Sql-problems57
/054.sql
UTF-8
355
4.4375
4
[]
no_license
with countries AS ( SELECT country FROM suppliers UNION SELECT country FROM customers ) SELECT c.country, coalesce(count(sp.country),0) as totalsupliers, coalesce(count(cp.country),0) as totalcustomers FROM countries c LEFT JOIN suppliers sp ON c.country = sp.country LEFT JOIN customers cp ON c.countr...
true
8b35bdf7813b1ef3b8be977ef389b80234476910
SQL
tarikac/project2
/db/seeds.sql
UTF-8
557
2.90625
3
[ "MIT" ]
permissive
INSERT INTO Users (email, password, occupation) VALUES ("bob@gmail.com", "bob123123", "TEACHER"); INSERT INTO Teachers (teacher_name, UserId) VALUES ("Mr. Brehm", 1); INSERT INTO Parents (parent_name) VALUES ("Carrie"); INSERT INTO Students (student_name, ParentId, TeacherId) VALUES ("Ruby", 1, 1); INSERT INTO Posts (...
true
f2b5cac71b687423338c67e5b0b3e103920284e4
SQL
danlangford/buttonmen
/deploy/database/updates/00908_favorite_button.sql
UTF-8
311
3.859375
4
[ "BSD-3-Clause" ]
permissive
ALTER TABLE player ADD COLUMN favorite_button_id SMALLINT UNSIGNED NULL AFTER comment, ADD COLUMN favorite_buttonset_id SMALLINT UNSIGNED NULL AFTER favorite_button_id, ADD FOREIGN KEY (favorite_button_id) REFERENCES button(id), ADD FOREIGN KEY (favorite_buttonset_id) REFERENCES buttonset(id);
true
256164ec846ac37aedd381716f25049fd51a4b43
SQL
hasura/graphql-asia-workshop
/hasura/migrations/1555138088523_init.up.sql
UTF-8
618
3.3125
3
[]
no_license
-- -- SQL edited by https://hasura-edit-pg-dump.now.sh -- CREATE TABLE public.articles ( id serial NOT NULL, author_id integer NOT NULL, title text NOT NULL, body text NOT NULL ); CREATE TABLE public.authors ( id serial NOT NULL, name text NOT NULL ); ALTER TABLE ONLY public.articles ADD...
true
6548c91e079c5d41c181f3fcddbc454feaf22d9f
SQL
PratikRaut15/speed-elixia-project
/.svn/pristine/65/6548c91e079c5d41c181f3fcddbc454feaf22d9f.svn-base
UTF-8
2,101
3.875
4
[]
no_license
/** Change details - 1) Updated by - Sanjeet Updated on - 30 August, 2018 Reason - Get Vehicle Data from Unit No call - CALL get_vehicle_data_from_unit_no('MP07HB1809','D613206','613'); */ DELIMITER $$ DROP PROCEDURE IF EXISTS `get_vehicle_data_from_unit_no`$$ CREATE PROCEDURE `get_vehicle_data_f...
true
7bc75d1ce29a55265cd5f1feb41d6b8ec2a166f8
SQL
Joncobb103/DailyCheck
/src/sqlFiles/tableQuery/depCheck.sql
UTF-8
256
2.953125
3
[]
no_license
select d.document_name,d.district_full_name, r.ocr_text,o.diff from developer.docv d left join developer.rocrv r on r.deposit_id = d.deposit_id left join developer.depvspid o on o.old_fig_deposits_record_id = r.deposit_id where d.deposit_id = (REPLACE ID);
true
02aa5d00ea950cc3b16ffba0ad6b449d46f917e1
SQL
Nikolay232/eng_education
/scripts/init/init.sql
UTF-8
24,494
2.8125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.3.6 -- Dumped by pg_dump version 9.3.6 -- Started on 2015-05-19 13:58:18 MSK SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messag...
true
9b3e58219e4a9f286974271bae3cb9d5147655f8
SQL
guaiamum/MyFirstEverPHP
/sql/DB_ListaTelef.sql
UTF-8
331
2.6875
3
[]
no_license
create database if not exists lista default character set utf8 default collate utf8_general_ci; use lista; create table if not exists contatos( `id` int not null auto_increment, `nome` varchar(30), `telefone` varchar(20), primary key (`id`) ) default charset = utf8; INSERT INTO contatos VALUES (DEFAULT, 'cbr'...
true
16813c5004121ed44d24ee9aae9746f440b02602
SQL
jdamsbo/bevs.dk
/_db/backup-20111018/pageviews.sql
UTF-8
1,409
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.0 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 18, 2011 at 09:39 AM -- Server version: 5.1.35 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
b6d79bea2420c8d17b7ed7c3c79244ef26a6a77f
SQL
RPL-Project/E-Commerce
/database/migrations/ecommerce.sql
UTF-8
5,812
2.796875
3
[ "MIT" ]
permissive
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versi server: 10.1.19-MariaDB - mariadb.org binary distribution -- OS Server: Win32 -- HeidiSQL Versi: 9.5.0.5196 -- ------------------------------------------------...
true
4fdba6f95bef800356360dedd3a5d5aa7f6b9ef2
SQL
JoaoPauloLeal/toolbox
/packages/ipm_cloud_postgresql/folha/sql_padrao/logradouro.sql
UTF-8
1,564
3.640625
4
[]
no_license
select * from ( select l.logcodigo as id, l.logcodigo as codigo, left(upper(l.lognome),50) as descricao, null as cep, -- public.bth_get_id_gerado('300', 'tipo-logradouro', (select substring(upper(tl.tplnome),1,20) from wun.tbtipolograd as tl where tl.tplcodigo = l.tplcodigo limit 1)) as tipoLogradouro, -- public....
true
8ecbc8c4bb08e855b84960da447ed084707ae88f
SQL
rogojagad/cerdas-cermat-Progjar
/soal.sql
UTF-8
2,568
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Nov 27, 2017 at 10:07 -- Server version: 10.1.21-MariaDB -- PHP Version: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
d005e180f0b259a65c012c68cd6c78508e358622
SQL
achmadnabawi/sparkdata
/wrt/outdoor/outdoor_10.sql
UTF-8
1,606
3.375
3
[]
no_license
create table t_wrt_outdoor_sale as select t1.*,t2.sold as april_sold,t2.sales as april_sales,t3.sold as may_sold,t3.sales as may_sales from (select t_lzh_outdoorid_temp.item_id, t_lzh_outdoorid_temp.title, t_lzh_outdoorid_temp.root_cat_name, t_lzh_outdoorid_temp.shop_name, t_lzh_outdoorid_temp.shop_id, t_lzh_outdoorid...
true
04e9c1e73711333ef452b1f758f2da5f44d546de
SQL
tika/vival
/prisma/migrations/20210410223230_fuck_you/migration.sql
UTF-8
2,826
3.578125
4
[]
no_license
-- CreateTable CREATE TABLE "User" ( "id" TEXT NOT NULL, "username" VARCHAR(255) NOT NULL, "email" VARCHAR(255) NOT NULL, "password" VARCHAR(255), PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Post" ( "id" TEXT NOT NULL, "caption" VARCHAR(2000), "createdAt" TIMESTAMP(3) NOT NULL D...
true
bee0111af07e6045a579ed93d013555cc4428f4e
SQL
moonsonu/Piscine_PHP
/day05/ex08/ex08.sql
UTF-8
131
2.6875
3
[]
no_license
SELECT `last_name`,`first_name`,DATE(birthdate) AS birthdate FROM user_card WHERE YEAR(birthdate) = 1989 ORDER BY 'last_name' ASC;
true
c2e6199e49292ff50ef5bd3710df22352ef4a266
SQL
TairatulJannat/Content-Managment-System
/CMS_PROJECT/cms.sql
UTF-8
5,575
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 26, 2021 at 04:56 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
8d50d9c55f631834544aa69201fb20fbcf0f92fa
SQL
alfaridzi/tanyabudi
/tbl_payment(1).sql
UTF-8
2,376
2.828125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 11 Bulan Mei 2018 pada 11.05 -- Versi server: 10.1.31-MariaDB -- Versi PHP: 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
8537eec6790a3ae316e30ed6e79047d9a2a680a8
SQL
yslan/nekRS
/examples/turbPipePeriodic/turbPipe.udf
UTF-8
1,208
2.71875
3
[ "BSD-3-Clause" ]
permissive
// // nekRS User Defined File // #include <math.h> #include "udf.hpp" #define RE_TAU 550.0 #define RE_B (1/ins->nu) /* User Functions */ occa::kernel addDpDzKernel; void userf(ins_t *ins, dfloat time, occa::memory o_U, occa::memory o_FU) { const dfloat DPDZ = -4*pow(RE_TAU/(0.5*RE_B), 2); const dlong Nlocal = ...
true
22eea04c6e1a91e8f7a75283fce3b2aff8690d78
SQL
DanyZurita/SQL
/integrity_alter_drop.sql
UTF-8
11,033
3.625
4
[]
no_license
/* 1. */ CREATE DATABASE MiniPremiereLeague USE MiniPremiereLeague /* 2. */ CREATE TABLE TEAMS ('tid' SMALLINT NOT NULL, 'tname' VARCHAR(50) NOT NULL UNIQUE, 'tyear' SMALLINT) /* 3. */ CREATE TABLE TEAMS (tid SMALLINT NOT NULL, tname VARCHAR(50) NOT NULL UNIQUE, ...
true
5f9d7cbe126612aae2fcfccd44a07136056bda87
SQL
amitmendi/SQL_Library
/WebsitePerformance_DCM_SQL/Website_Performance_Analysis.sql
WINDOWS-1250
7,164
4.53125
5
[]
no_license
--SQL Queries --Database Glossary --- Tables used in this analysis: --- Analytics: contains DCM data with session information and other metadata --- Click: contains user information who clicked through the ad --- Activity: contains user information with associated activity on the website (users that did...
true
0fb99201d9a5c8e5998937fcd7f9ffef7e7c207a
SQL
Dyson1990/MyWheels3
/SQL/创建所有人只能查询的database.sql
UTF-8
988
3.25
3
[]
no_license
CREATE DATABASE IF NOT EXISTS db_ccad; GRANT ALL ON db_ccad.* TO 'usr_sdy'@'%'; DELIMITER $$ DROP PROCEDURE IF EXISTS `qy_data`.`select_to_all` $$ CREATE PROCEDURE `select_to_all`() BEGIN DECLARE usr_name CHAR(32); DECLARE end_mark INT DEFAULT 0; DECLARE usr_cur CURSOR FOR ( SELECT `User` FROM `mysql`.`user` WHE...
true
c279f0cf5eb16fbd4b815b1d44973a396eb01a42
SQL
debraj92/script_grader
/downloaded_answers/DemoStudent Tabassum_15632053_assignsubmission_file_/2.sql
UTF-8
114
3.296875
3
[]
no_license
--Query 2 Ntabassu SELECT bid FROM Branch WHERE assets >=(SELECT avg (assets) FROM Branch WHERE city="Edmonton")
true
242335d583892c93070c74d0214c827f7edea3d7
SQL
all-amazing/72crm-java
/src/main/resources/template/crm/contact.sql
UTF-8
5,776
3.515625
4
[]
no_license
#namespace("crm.contact") #sql("getContactsPageList") select a.contacts_id,name,a.customer_id,c.customer_name,b.realname as ownerUserName from 72crm_crm_contacts as a left join 72crm_admin_user as b on a.owner_user_id = b.user_id left join 72crm_crm_customer as c on a.customer_id = c.customer_id whe...
true
54a754d93e0aeab9ea3e394ee8473e07e277f6c2
SQL
l-canti-l/SQLproject
/populate.sql
UTF-8
10,423
3.140625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `university` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `university`; -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: university -- ------------------------------------------------...
true
a54c648eb1ef196c47e2976b93ce981e20979783
SQL
gabrielporres1985/SuigenTrainingApp
/training/app/model/src/main/resources/db/current/model.sql
UTF-8
6,208
3.78125
4
[ "Apache-2.0" ]
permissive
-- SQL for Schema MODEL -- -- if NeedsCreateSequence create sequence QName(MODEL, COMPANY_SEQ) start with SequenceStartValue(1) increment by 1 SequenceCache;; create sequence QName(MODEL, PERSON_SEQ) start with SequenceStartValue(1) increment by 1 SequenceCache;; create sequence QName(MODEL, PRODUCT_SEQ) start w...
true
ac82dabc99f496f495a52f570a5b8bdb69d6cb7e
SQL
Juul94/minportfolio
/database/portfolio_kategori.sql
UTF-8
1,431
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.8.1 -- http://www.phpmyadmin.net -- -- Host: alexanderjs.dk.mysql:3306 -- Generation Time: Oct 04, 2018 at 11:24 PM -- Server version: 10.1.30-MariaDB-1~xenial -- PHP Version: 5.4.45-0+deb7u13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
14162f8e608c4c8bba2d4a0b1d5622a7835d3066
SQL
benhopper1/transcip
/trans/mysql/sql/example/buildingsmsTocontact_4.sql
UTF-8
1,043
3.4375
3
[]
no_license
SELECT vw_activeUser.fullName, vw_activeUser.screenImage, t3.name, t3.imageUrl, t3.smsId, t3.contactName, t3.contactPhoneNumber, t3.date, t3.dateSent, t3.thread, t3.read, t3.smsContext, t3.userId, t3.body FROM ( SELECT t2.name, t2.imageUrl, tb_smsStore.* FROM tb_smsStore LEFT JOIN ( SELECT userId, phoneNumb...
true
5c61da3806495c1b3855148da65a2fd37812063e
SQL
Bornpagna/purchase_blue
/db/sql_remote_boq_item.sql
UTF-8
1,345
3.65625
4
[]
no_license
SELECT (F.stock_qty / F.use_qty) AS stock_qty FROM (SELECT E.stock_qty, (SELECT pr_units.`factor` FROM pr_units WHERE pr_units.`from_code` = 'កេស' AND pr_units.`to_code` = E.unit_stock) AS use_qty FROM (SELECT D.item_id, D.unit_stock, SUM(D.stock_qt...
true
292b9d171cfbf9dd61ff792a44f02cbfd9e78431
SQL
apache/cassandra
/doc/modules/cassandra/examples/CQL/select_statement.cql
UTF-8
354
3.359375
3
[ "Apache-2.0", "MIT", "CC0-1.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
SELECT name, occupation FROM users WHERE userid IN (199, 200, 207); SELECT JSON name, occupation FROM users WHERE userid = 199; SELECT name AS user_name, occupation AS user_occupation FROM users; SELECT time, value FROM events WHERE event_type = 'myEvent' AND time > '2011-02-03' AND time <= '2012-01-01' SELECT CO...
true
36d6f0ab8c5fa1ef30939341ec1acbcb30b75137
SQL
AdminQAq678/hawo
/sql/hawo.sql
UTF-8
5,169
3.4375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 09/02/20 13:04:24 -- Model: New Model Version: 1.0 -- 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='TRADITION...
true
b9f3b90aeb3adb3514f829bf12d70567e59f89e8
SQL
GitHongWu/.NET_Full_Stack
/Day3/day3_hw.sql
ISO-8859-9
5,623
4.6875
5
[]
no_license
--1. In SQL Server, assuming you can find the result by using both joins and subqueries, which one would you -- prefer to use and why? Subqueries can be used to return either a scalar (single) value or a row set; whereas, joins are used to return rows. --2. What is CTE and when to use it? The Common Table Expressio...
true
1d4db7aec0e35e9c52b6967afd4da900766080d7
SQL
2677367787/Praise
/DB/数据库.sql
UTF-8
35,349
3.1875
3
[]
no_license
/* SQLyog Ultimate v12.5.0 (64 bit) MySQL - 5.6.17 : Database - praisesystem ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOR...
true
e49b0bfaaa435f6602297d0daffec9f519cbeb64
SQL
DIBYA03/TF-code
/WISE/core-platform/migrations/core/00025_point_of_sale.sql
UTF-8
995
3.1875
3
[]
no_license
-- +goose Up CREATE TABLE point_of_sale ( id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), business_id UUID REFERENCES business (id), alias TEXT DEFAULT NULL, device_type TEXT DEFAULT NULL, serial_number ...
true
4abf7ed1cd2c0f95594bb37bf4df6bac98e5e7ea
SQL
e-muf/proyecto-base-de-datos
/3_scripts/s-02-entidades.sql
UTF-8
3,629
3.265625
3
[]
no_license
--@Autores: Emanuel Flores, Adolfo Barrero --@Fecha creación: 01/12/2019 --@Descripción: DDL empleado para crear las tablas del caso de estudio --CREAR AQUI EMPLEADO CREATE TABLE GRADO_ACADEMICO( grado_academico_id number(10, 0) primary key, cedula_profesional number(10, 0) not null, titulo varchar2(40) n...
true
ef66fceaddb6f0117992d21c4a6f5e7c8bfb61e4
SQL
turkmuhendisnet/SQL
/Sql_Insert_Update_Delete_Procedure.sql
UTF-8
513
3.09375
3
[]
no_license
create procedure InsertUpdateDelete (@id int=null,@Adi varchar(250)=null,@Soyadi varchar(250)=null,@KayitTarihi datetime=null, @Islem nvarchar(20) = '') as begin if @Islem='Ekle' begin insert into Personel (Adi,Soyadi,KayitTarihi) values(@Adi,@Soyadi,@KayitTarihi) end if @Islem='Güncelle' begin update Personel set Adi=...
true
9931a689e99823ab095917f8e787f78c1cbd958a
SQL
geekluxun/sqlscript
/common/common.sql
UTF-8
2,414
3.265625
3
[]
no_license
######################### 通用指令 start!!! ##################### #索引区分度公式 (0.1以上) SELECT count(distinct user_id)/count(*) FROM t_user_customer_ykqj; #显示表的索引信息 SHOW INDEX FROM t_user_customer_ykqj; #慢查询时间 SHOW variables LIKE 'long%'; #慢查询记录 SHOW variables LIKE 'slow%'; SHOW VARIABLES LIKE 'log%'; #查询缓存 SHOW VARIABLE...
true
14abc0196722a750883aedc7727fd51d2f5c029e
SQL
JeffTang139/jtcore
/org.eclipse.jt.core/src/org/eclipse/jt/core/impl/db2dna_isleapmonth.sql
UTF-8
284
2.875
3
[]
no_license
create function dna_isleapmonth(ts timestamp) returns int specific dna_isleapmonth language sql deterministic begin atomic declare y int; set y = year(ts); return case when month(ts)<>2 then 0 when mod(y,400)=0 then 1 when mod(y,100)=0 then 0 when mod(y,4)=0 then 1 else 0 end; end
true
6a2bf576153fb14c65470870ba7f099c39e81364
SQL
QetzylTech/SMS-AppServer
/src/database/sql/grades/findByIDs.sql
UTF-8
338
3.296875
3
[]
no_license
SELECT g.enrollment_id, g.subject_id, s.name as subject_name, s.code as subject_code, s.unit_lec as subject_unit_lec, s.unit_lab as subject_unit_lab, g.grade, g.updated_at FROM grades g INNER JOIN subjects s ON g.subject_id = s.id WHERE g.enrollment_id = ${enrollment_id} AND g.subject_id...
true
70e1df9a74236b3166a1aa7c40e69f3d09d2dddc
SQL
Kornelw/weather_station_IMGW
/SQL/skrypt.sql
UTF-8
6,720
3.296875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Thu Dec 7 12:17:52 2017 -- Model: New Model Version: 1.0 -- 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='TR...
true