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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d258fe035879f94ca1aada3bf4f95f12a086bd06 | SQL | thien29797/SQL-Practices | /sql_scripts/type_data.sql | UTF-8 | 414 | 2.9375 | 3 | [] | no_license | -- Use the scoredb database
USE scoredb;
-- Disable foreign key checking
SET foreign_key_checks = 0;
-- Drop an type_data table
DROP TABLE IF EXISTS type_data;
-- Create an type_data table
CREATE TABLE type_data
( type_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT
, type_name VARCHAR(255));
-- Insert data
INSERT INTO... | true |
bfc03c66f23e38bc1b3e7fa51ba71b2dfdeb78cc | SQL | usstzcx/sqlSubmit | /src/main/resources/sql/connector/kafka_to_hbase.sql | UTF-8 | 1,235 | 3.671875 | 4 | [
"Apache-2.0"
] | permissive | -- kafka source
drop table if exists user_log;
CREATE TABLE user_log (
user_id VARCHAR
,item_id VARCHAR
,category_id VARCHAR
,behavior VARCHAR
,ts TIMESTAMP(3)
) WITH (
'connector.type' = 'kafka'
,'connector.version' = 'universal'
,'connector.topic' = 'user_behavior'
,'connector.properties.zookeeper.c... | true |
751b4e555238825467f2c300817e82185801ce64 | SQL | JWYSOKI/database-exercises | /database-exercises/functions_exercises.sql | UTF-8 | 781 | 3.78125 | 4 | [] | no_license | USE employees;
SELECT *
FROM employees
WHERE (gender = 'm')
and (first_name = 'Irena'
or first_name = 'Vidya'
or first_name = 'Maya')
ORDER BY first_name, last_name;
SELECT *
FROM employees
WHERE last_name like 'e%'
ORDER BY emp_no DESC;
SELECT *
FROM employees
WHERE hire_date like('199%... | true |
197418bcec59dc308437c07d56d3fad25097ba11 | SQL | cckmit/pnlb | /db/maintain/Maintenance/0_SyncNames.sql | UTF-8 | 1,518 | 3 | 3 | [] | no_license | /*************************************************************************
* The contents of this file are subject to the Compiere License. You may
* obtain a copy of the License at http://www.compiere.org/license.html
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
* express or impl... | true |
aa686586a306a4c068f7fd8e3bdf202b97d0a6ca | SQL | bcraig2612/mySQL_Bootcamp | /.Sections1-6/sectionFour.sql | UTF-8 | 717 | 3.578125 | 4 | [] | no_license | -- CREATE TABLE customer (
-- customer_id INT NOT NULL AUTO_INCREMENT,
-- first_name VARCHAR(20) NOT NULL,
-- last_name VARCHAR(20) NOT NULL,
-- age INT,
-- PRIMARY KEY (customer_id)
-- );
-- CREATE TABLE dogs
-- (
-- name VARCHAR(20) DEFAULT 'Not Given A Name',
-- age INT default 1
-- );
-- INSE... | true |
14dd53ece39ff7803c71aabadeeb0eb39ae40261 | SQL | marty-p/bd1-2018-esercitazioni | /esercitazione-06-bis/select.sql | UTF-8 | 2,262 | 3.921875 | 4 | [] | no_license | /*4) Uso delle viste nelle interrogazioni
Facendo uso delle viste precedentemente definite, formulare le seguenti interrogazioni:*/
/*___________________________________________
e) Per ciascun immobile ancora invenduto, determinare il numero di volte in cui è stato
visitato.*/
/* MIA */
select codi, count(visita.cod... | true |
d35bc53fb64fda0cce0a4598779ad8d279037dcd | SQL | haxorcise/CS147 | /week4/books.sql | UTF-8 | 1,572 | 2.90625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `books` (
`title` varchar(100) NOT NULL,
`author` varchar(100) NOT NULL,
`image` text,
`asin` varchar(12) NOT NULL,
`rating` tinyint(4) DEFAULT '0',
`inventory` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `books` (`title`, `author`, `image`, `asin`, `ratin... | true |
1b11faf7bc74c878db8e95e963657494c011e990 | SQL | rogeriosabins/Sistema-de-doacao-de-sangue-BD1- | /BancodeSangue/build/classes/bancodesangue/MySql/sangue.sql | UTF-8 | 869 | 3.421875 | 3 | [] | no_license | CREATE DATABASE BD;
use BD;
DROP TABLE IF EXISTS FAZ;
DROP TABLE IF EXISTS DOADOR;
DROP TABLE IF EXISTS DOACAO;
DROP TABLE IF EXISTS COLETOR;
create table COLETOR(
id_coletor integer primary key,
nome_coletor varchar(100));
create table DOACAO(
id_doacao integer auto_increment primary key ,
data_doacao v... | true |
a2b97dd42b13476cb7c3056f0fee14d2d9163a49 | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_list_PurchaseReturn_DocLU_Cancel.sql | UTF-8 | 1,533 | 3.703125 | 4 | [] | no_license | CREATE Procedure sp_list_PurchaseReturn_DocLU_Cancel ( @FromDoc int,@ToDoc int,@DocumentRef nvarchar(510)=N'')
As
If Len(@DocumentRef)=0
begin
Select AdjustmentID, DocumentID,
AdjustmentReturnAbstract.VendorID, Vendors.Vendor_Name, AdjustmentDate, IsNull(Total_Value,0),
Balance, Status,IsNull(DocReference,0... | true |
c6e150f769f02f18db8d0f34e2999d88b2419d92 | SQL | wonderfan/magento | /clean_foreigh_key_check.sql | UTF-8 | 669 | 2.65625 | 3 | [] | no_license | delete from `catalog_category_product` WHERE product_id not in(select entity_id from catalog_product_entity);
delete from `catalog_category_product` WHERE category_id not in(select entity_id from catalog_category_entity) ;
delete from `catalog_product_index_eav_idx` WHERE entity_id not in(select entity_id from catalog... | true |
29f61da4c067120fc76630086ff5c6018ed61f60 | SQL | blue19demon/OAuth2.0Security | /security2.0-demo/target/classes/sql/security_test.sql | UTF-8 | 3,723 | 3.484375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50719
Source Host : localhost:3306
Source Database : security_test
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2019-10-14 18:05:47
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
581af9596807c2fadc05dc5987da1ebcaa5e41cf | SQL | 2018group18webgallery/webgallery | /webgallery.sql | UTF-8 | 2,420 | 3.65625 | 4 | [] | no_license | --------------------------------------Download---------------------------------
create table download(
DownloadId int identity(1,1) primary key,
UserId int ,
PictureCode varchar(100),
DownloadDate datetime);
-----------------------Users --------------------------------------
create table users(UserId int not null ... | true |
d8c48592461586ee3fe05e2f7f2bec661603fa10 | SQL | tomielee/databas-skolan | /skolan/dml_select.sql | UTF-8 | 1,906 | 4.21875 | 4 | [] | no_license | --
-- Create reports from table teacher from database skolan
-- By Jen Lee, course databas v1
-- 2018-01-24
-- Visa alla rader i tabellen där avdelningen är DIDD.
SELECT * FROM teacher
WHERE section = 'DIDD';
-- Visa de rader som har en akronym som börjar med bokstaven ‘h’ (ledtråd LIKE).
SELECT * FROM teacher
WHERE... | true |
963c7575031fbab8adaeac4dffbf5ada6898c50f | SQL | printscreen/store_db | /SQL/1.0/schemas/transaction/views/v_order_postage_addon.sql | UTF-8 | 755 | 3.34375 | 3 | [] | no_license | DROP VIEW IF EXISTS transaction.v_order_postage_addon;
CREATE OR REPLACE VIEW transaction.v_order_postage_addon AS
SELECT
opa.order_postage_addon_id AS order_postage_addon_id
,opa.order_postage_id AS order_postage_id
,op.order_id AS order_id
,opa.carrier_addon_id AS carrier_addon_id
,ca.name AS car... | true |
9a241dfbff3c655f0c83be3bf5aa03cf1a84a306 | SQL | cucker0/JavaWeb | /bookmall_v5/sql/bookmall_v5.sql | UTF-8 | 11,720 | 3.703125 | 4 | [] | no_license | USE bookmall;
-- drop table t_author, t_book, t_publisher, r_book_author;
-- 创建图书表
CREATE TABLE t_book (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(64) NOT NULL COMMENT '书名',
`price` DOUBLE(11, 2) NOT NULL COMMENT '价格',
`sales` INT NOT NULL DEFAULT 0 COMMENT '销量',
`stock` IN... | true |
56bb3b5d1b84c91322b0a53eea5c8cbb80505139 | SQL | tsminhuang/CMPE_226_LearningX | /src/main/resources/import-data.sql | UTF-8 | 5,732 | 3.59375 | 4 | [] | no_license | -- AppUser (username, password, appRole)
INSERT INTO AppUser (username, password, appRole)
VALUES ("student1", "student1", 0);
INSERT INTO AppUser (username, password, appRole)
VALUES ("student2", "student2", 0);
INSERT INTO AppUser (username, password, appRole)
VALUES ("SJSU_T1", "SJSU_T1", 1);
INSERT INTO AppUser (u... | true |
8ac84806ee9f804bc13e4c310df29bbe28588c70 | SQL | AldenMathews/NodeJS-MySQL | /bamazon.sql | UTF-8 | 1,632 | 2.84375 | 3 | [] | no_license | CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
id INTEGER(11) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(50),
department_name VARCHAR(50),
price VARCHAR(50),
stock_quantity VARCHAR(50),
PRIMARY KEY (id)
);
INSERT INTO products (product_name, department_name, price, stock_quantity) ... | true |
ddc7f7126a6000be05f0d781af057478e6fc6d58 | SQL | dimitarminchev/ITCareer | /06. Бази данни/04. Data/4.1.4.sql | UTF-8 | 441 | 2.9375 | 3 | [
"CC-BY-NC-4.0",
"CC-BY-NC-SA-4.0"
] | permissive | /*
Задача 4.4. Намерете първите 10 започнати проекта
Напишете заявка, с която да откриете първите 10 започнати проекта. Изберете цялата информация за тях и ги сортирайте по начална дата, после по име.
*/
use `soft_uni`;
select *
from `projects`
order by `start_date`, `name`
limit 10; | true |
0fba1b95e458226063da0b962b3b8cade406fce5 | SQL | fccourses/fd_db | /fd_test_db.session.sql | UTF-8 | 3,960 | 3.765625 | 4 | [] | no_license | DROP TABLE "users";
/*
1. CONSTRAINT: Full name не пустая строка
2. COLUMN: height domain? containts?
*/
ALTER TABLE "users" DROP COLUMN height;
CREATE TABLE "users" (
id serial PRIMARY KEY,
first_name varchar(64) NOT NULL CHECK (first_name != ''),
last_name varchar(64) NOT NULL CHECK (last_name != ''),
em... | true |
7afa80c20f65c8f4d5cf380a34b2a87993c1e0fa | SQL | Naviam/Home-Accounting-Old | /Database/Schema Objects/Schemas/web/Programmability/Stored Procedures/companies_get.proc.sql | UTF-8 | 405 | 3.390625 | 3 | [] | no_license | -- =============================================
-- Author: Pavel Mironchik
-- Create date: 04/08/2011
-- Description: Get user
-- =============================================
CREATE PROCEDURE [web].[companies_get]
@id_user int
AS
BEGIN
SELECT c.id, c.id_country, c.name_business, c.id_company_type
FROM users_co... | true |
a38ebdaaf1a57955462f2da16c41b3b626ee90fc | SQL | sangjiexun/limsproduct2 | /limsproduct/src/main/resources/db/migration/V20190620_3.0__table_asset_receive_record.sql | UTF-8 | 380 | 2.515625 | 3 | [] | no_license | -- 功能:修改字段类型
-- 作者:吴奇臻
-- 日期:2019-06-20
ALTER TABLE `asset_receive_record`
MODIFY COLUMN `quantity` int(11) NULL DEFAULT NULL COMMENT '申领数量' AFTER `unit`;
delete from authority_menu where menu_id in (SELECT id from system_menu where identification='material.record');
DELETE from system_menu where identification='mat... | true |
218782f5de930fb1703f1d681802cec6070a6e5c | SQL | Arthur-Sena/SQL | /SQL/Gufos/T_02_ArthurSena_DML.sql | IBM852 | 793 | 3.4375 | 3 | [] | no_license | CREATE DATABASE T_Gufos
USE T_Gufos
CREATE TABLE Categorias(
IdCategoria int primary key identity not null
,Nome varchar(255) not null unique
);
create table Eventos(
IdEventos int primary key identity not null
,Titulo varchar(255) not null
,Descricao text
,DataEvento datetime not null
,Ativo bit... | true |
3660d6f69e5c7f43e6d27383381975addc12dfa0 | SQL | srgiri/TakeNote | /src/main/resources/create-tables.sql | UTF-8 | 2,611 | 3.765625 | 4 | [] | no_license | CREATE TABLE takenote.users (
user_uuid uuid NOT NULL,
username VARCHAR(50) NOT NULL,
password VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
PRIMARY KEY (user_uuid));
CREATE TABLE takenote.shelf (
shelf_id INT NOT NULL,
shelf_name VARCHAR(45) NOT NULL,
is_deleted BOOLEAN NULL,
user_uuid uuid NO... | true |
291d6c046d5c9895b961ffbde54b8b4f6e408820 | SQL | Winter-Win/package | /MySQL/表的操作.sql | UTF-8 | 5,281 | 4.53125 | 5 | [] | no_license | -- 1.创建表
CREATE TABLE table_name(
fielid1 datatype,
fielid2 datatype,
fielid3 datatype
)charactor set 字符集 collate 校验规则 engine 存储引擎;
-- 说明:
-- field 表示列名
-- datatype 表示列的类型
-- character set 字符集,如果没有指定字符集,则以所在数据库的字符集为准
-- collate 校验规则,如果没有指定校验规则,则以所在数据库的校验规则为准
-- 表相关操作
-- 建表
CREATE TABLE students (
... | true |
0a4ab746fa103b07125f2c24aedbc0f2cc1738c9 | SQL | guntiso/mojoz | /src/test/resources/tables-out-oracle.sql | UTF-8 | 9,221 | 3.921875 | 4 | [] | no_license | create table account(
id numeric(18),
bank_id numeric(18) not null,
billing_account varchar2(64 char) not null,
last_modified timestamp not null
);
comment on table account is 'Klienta norēķina konts';
comment on column account.id is 'Ieraksta identifikators.';
comment on column account.bank_id is 'Bankas ID, s... | true |
3aaf9ec94d384775d2674feb11d2268d62b094c0 | SQL | marciabcs/42aventure | /WEB/piscine/j05/ex16/ex16.sql | UTF-8 | 151 | 2.984375 | 3 | [] | no_license | SELECT COUNT(id_film) FROM historique_membre
WHERE (DATE(date) >= 2006-30-10 AND DATE(date) <= 2007-27-07)
OR (MONTH(date) = 12 AND DAY(date) = 24); | true |
9b95625457ff57a8b6c015eac8bfc6617aeb3a31 | SQL | Manickaraj-stack/projectmanager-webapi | /create_table.sql | UTF-8 | 1,113 | 4.09375 | 4 | [] | no_license | CREATE TABLE Users (
ID int IDENTITY (1, 1) NOT NULL,
FirstName varchar(255) NOT NULL,
LastName varchar(255) NOT NULL,
PRIMARY KEY (ID)
);
CREATE TABLE Project (
ProjectId int IDENTITY (1, 1) NOT NULL,
ProjectName varchar(255) NOT NULL,
IsSetdate bit,
ID int NOT NULL,
StartDate ... | true |
b33e813116376478124c829152c3924f3da2113b | SQL | leandrouni01/alkemy-sql-custom | /SQLII-evaluacion-integral-ej.sql | UTF-8 | 1,775 | 4 | 4 | [] | no_license | -- modelo: https://lh3.googleusercontent.com/H0OrPiaFu3RKjSoIhFUPJPbTdFGG4gu4S24qHmTSjaRV04QpYZbICRQ-Y6i-DnNCH6pxt0gqLYTbISTuIpAPmM73XXlOS228hhbpmg5DrrvbjD9UiW6hhwujnV8PGoSYq6ZCxSM
--1 Escriba una consulta que devuelva el legajo y la cantidad de cursos que realiza cada estudiante.
SELECT
legajo,
(
SELECT count(*) ... | true |
555fec2cb3b5a837702940635c0d5a6ee02e020d | SQL | mtaste/appMarket | /nginx/test.sql | UTF-8 | 31,715 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : jst
Source Server Version : 50714
Source Host : jst:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2017-02-27 17:08:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------... | true |
9cdd0e678f5cdfdbf9748af7ddfbda0e7997019a | SQL | GonzaloTorreras/gamification-1 | /MySQL Backup/gamificacion.sql | UTF-8 | 6,333 | 3.65625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-12-2013 a las 15:50:11
-- Versión del servidor: 5.6.11
-- Versión de PHP: 5.5.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
add7d839dd4a307663d8c154b77f793024c95f6b | SQL | LabNeuroCogDevel/RestDB | /schema_pipe.sql | UTF-8 | 1,916 | 3.265625 | 3 | [] | no_license | -- improved schema with atlas info separated from pipeline metrics (fd, dvars, sp)
-- would need to rewrite matlab *.mat files to insert
-- created 20190502, still unimplemented 20191204
-- session info
create table ses (
-- likely subj_ymd
ses_id varchar(50) primary key,
study varchar(10), -- delete from ... | true |
b59d1804b79282cd764f9d4cf6ed57f8e6d9a260 | SQL | choi258/Role_Scheme_and_SQL_queries | /ORACLE_SQL/prob_2.sql | UTF-8 | 314 | 4.03125 | 4 | [] | no_license | select s.STUDENTNAME as StudentName, count(o.COURSEID) as NumOfCourses
from STUDENT s left outer join REGISTRATION r
on s.STUDENTID = r.STUDENTID left outer join OFFERING o
on r.OFFERINGID = o.OFFERINGID
where s.BIRTHDATE >= all(select BIRTHDATE from STUDENT)
group by s.STUDENTNAME
order by count(o.COURSEID) asc; | true |
9a2e5c0d7cf64014c42e48ed2fe59e68024fe24d | SQL | KeswaniSunil/bat_loopback | /backup/2019-04-16/mymain_2019-04-16.sql | UTF-8 | 6,965 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.16 Distrib 10.1.34-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: mymain
-- ------------------------------------------------------
-- Server version 10.1.34-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... | true |
8ff9d83068bcf9648b6c7387389ef7221e4ebbba | SQL | fodisi/ByteAcademy-Bootcamp | /MondayPresentations/2_sql_server/create_load_table_script.sql | UTF-8 | 836 | 3.765625 | 4 | [] | no_license | IF object_id('MONDAY.dbo.test') IS NOT NULL
BEGIN
DROP TABLE MONDAY.dbo.test
END
--1,000,000 Random rows of data
SELECT TOP 1000000 IDENTITY(INT,1,1) AS ID,
RAND(CHECKSUM(NEWID())) * 30000 + CAST('1945' AS DATETIME) AS randomDate,
ABS(CHECKSUM(NEWID())) AS randomBigInt,
(ABS(CHECKSUM(NEWID())) % 100) + 1 AS randomSma... | true |
c0ecb7f50e069a475e0db2417297b474dd6bec06 | SQL | leohowell/leetcode-python | /sql-hero/180.sql | UTF-8 | 279 | 3.375 | 3 | [] | no_license | -- 180. 连续出现的数字
-- https://leetcode-cn.com/problems/consecutive-numbers/
select distinct l1.Num as ConsecutiveNums
from Logs l1, Logs l2, Logs l3
where
l1.Id = l2.Id - 1
and l2.Id = l3.Id - 1
and l1.Num = l2.Num
and l2.Num = l3.Num
and l1.Num = l3.Num
| true |
7bd7ca8677b6ac34b2bd8e789fac14af841eaaf0 | SQL | IWA-G3/Back | /init.sql | UTF-8 | 1,476 | 3.796875 | 4 | [] | no_license | -- Database: covid_alert_db
ALTER SYSTEM SET wal_level = logical;
DROP DATABASE IF EXISTS covid_alert_db;
CREATE DATABASE covid_alert_db
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
\c covid_alert_d... | true |
379ecdfe770466dde5c89faae94150be5eb806c5 | SQL | Last-Mile-Health/LMD-Databases | /lastmile_report/view/view_community_household.sql | UTF-8 | 1,837 | 3.390625 | 3 | [] | no_license | use lastmile_report;
drop view if exists lastmile_report.view_community_household;
create view lastmile_report.view_community_household as
select
-- community_grand_bassa_master.master_list_id: (1172)
cast( if( c.community_id >= 3000, substring_index( substring_index( c.note, ')', 1 ), '(', -1 ) , null... | true |
2622cae01e337585cd1f651bc84e2b6c994e59d7 | SQL | DieyseMichele/Atividade-3 | /cadastro.sql | UTF-8 | 1,731 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 03-Dez-2020 às 23:04
-- Versão do servidor: 10.4.13-MariaDB
-- versão do PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
21dceb9b2cf9829ea264131c255e6ba6813d61cc | SQL | Cooks-Johns/database-exercises | /limit_exercises.sql | UTF-8 | 435 | 3.5625 | 4 | [] | no_license |
USE employees;
SELECT *
FROM employees
WHERE birth_date LIKE '%-05-23'
ORDER BY hire_date
LIMIT 20;
SELECT DISTINCT titles
FROM titles;
SELECT DISTINCT last_name
FROM employees
ORDER BY last_name DESC
LIMIT 10;
SELECT *
FROM employees
WHERE hire_date BETWEEEN '1990-01-01' AND '1999-12-31';
AND birth_date LIKE... | true |
8d82cdf32ded38c47cf5e29f96c75df3dc34c60d | SQL | i-subota/gae-vacation | /vacation-app/src/main/resources/sql/schema.sql | UTF-8 | 278 | 2.71875 | 3 | [] | no_license | DROP TABLE IF EXISTS USER ;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`position` varchar(255) DEFAULT NULL,
`birthday` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
); | true |
c43ec87d6d5b778f97ced8bcf41b74b480df206a | SQL | gopal-ramasamy/DB2Scripts | /activeApplications_V10.sql | UTF-8 | 1,374 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | -- --------------------------------------------------------------------
-- activeApplications.sql
--
-- $Id: activeApplications_V10.sql,v 1.1 2017/04/04 02:25:29 db2admin Exp db2admin $
--
-- Description:
-- List Aapplications and their status
--
-- Usage:
-- activeApplications.sql
--
-- $Name: $
--
-- ... | true |
5cf5ad377ca6fb06d142e0ceff8585eb736914f7 | SQL | nihanth/issue-tracker | /dbscripts/dbscript.sql | UTF-8 | 3,675 | 4.09375 | 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 `issueTrackerDb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
use issueTrackerDb... | true |
8b97193a8a0127eaf9726f962cd2e176dbb55253 | SQL | fourquadrantlogger/db_note | /mysqlserver/性能相关因素/使用in代替多次sql查询.sql | UTF-8 | 252 | 2.828125 | 3 | [] | no_license | # 快
SELECT NAME FROM USERS WHERE PRICE=100;
# 用程序拼接 name s
SELECT * FROM Persons WHERE LastName IN ('Adams','Carter')
# 慢
SELECT NAME FROM USERS WHERE PRICE=100;
# 用程序拼接 name s
for{
SELECT * FROM Persons WHERE LastName =name
}
| true |
7efa1447c425efb31eda4b9f811c38ed66740a58 | SQL | LabKey/cnprcEHRModules | /cnprc_ehr/resources/queries/study/conceptionDetailInfo.sql | UTF-8 | 2,633 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2018 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | true |
6236bbbf89615cce6824a677f2231d92c3d4bac6 | SQL | johnm1990/week2 | /vids.sql | UTF-8 | 1,201 | 3.71875 | 4 | [] | no_license | /*Week 2 Assignment */
/* Videos Table - keep track of the videos */
INSERT INTO track (ID, Title, Length, Url) VALUES (1, 'Learn Sql in 1 hour', 37,'https://www.youtube.com/watch?v=sHQhc5Jz6SQ');
INSERT INTO track (ID, Title, Length, Url) VALUES (2, 'Learn Sql in 2 hour', 37,'https://www.youtube.com/watch?v=sHQhc5Jz6... | true |
f1d92ebca243c512c1a25858ae1c26271fc7713c | SQL | CaptainVish/Vehicle-Parking-Database-Management-System | /vpmsdb.sql | UTF-8 | 8,974 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 13, 2020 at 07:10 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
b89781721ec434e750b066f5a0719344616d463b | SQL | psalmdawg/farmerapp | /farmer.sql | UTF-8 | 2,004 | 2.890625 | 3 | [] | no_license | create database farmerapp
\c farmerapp
CREATE TABLE items (
id SERIAL4 PRIMARY KEY,
name VARCHAR(100),
category VARCHAR(100),
description VARCHAR(1000),
sold_status VARCHAR(100) NOT NULL,
Image_url VARCHAR (500),
price VARCHAR (100),
user_id INTEGER
);
CREATE TABLE users (
... | true |
362e3c0cb8ff1fa1987c7639743827ee7422175f | SQL | rohitsaini1196/cycle-sharing | /gg.sql | UTF-8 | 734 | 3.09375 | 3 | [] | no_license | /*Copy these lines and paste if you want to manually add to Databases */
CREATE TABLE users (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
user_email VARCHAR(320) NOT NULL,
password VARCHAR(255) NOT NULL,
address VARCHAR(255),
contact_no VARCHAR(20),
PRIMARY... | true |
5affa434392c0fee243016e3b0e275a32d34db08 | SQL | z741280229/fastDFSfilesystem | /tk_system.sql | UTF-8 | 2,344 | 3.328125 | 3 | [] | no_license | /*
SQLyog Ultimate v11.24 (32 bit)
MySQL - 5.6.33 : Database - static_files
*********************************************************************
*/
/*!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 |
f3e989d45beeddf432509b3e7e7f730b03148b79 | SQL | DumitriuAdelina/Fmi-DB | /lab2/10-20.sql | WINDOWS-1252 | 1,448 | 3.984375 | 4 | [] | no_license | --10
SELECT first_name,last_name,job_id,hire_date
FROM employees
WHERE hire_date BETWEEN 20-feb-1987 and 1-may-1989
ORDER BY hire_date;
--11
select first_name,last_name,department_id
from employees
where department_id in(10,30)
order by first_name;
--12
select first_name||' '||last_name "angajat",salary "salariu luna... | true |
f1b334836080058cce90ebd45702e12e9230aae8 | SQL | sdeli/php-mvc-login-system | /mysql/procedures/is-email-taken-proc.sql | UTF-8 | 277 | 3.09375 | 3 | [] | no_license | drop procedure if exists isEmailTakenProc;
delimiter //
create procedure isEmailTakenProc(
in currEmail char(50)
)
begin
select if(count(email) > 0, true, false) as isEmailTaken
FROM users where email LIKE currEmail;
end //
delimiter ;
# call isEmailTakenProc('majom@majom.com');
| true |
d6b5585642bdd921347b029eeb1f18e93de4b05d | SQL | catalistt/BBDD-Desafio_3 | /Desafio3.sql | UTF-8 | 1,647 | 3.625 | 4 | [] | no_license | --CASO 01
--Se considera el nombre como UN SOLO DATO, al NO ESPECIFICAR que corresponde a un atributo compuesto.
--Cada trabajador solo tiene UNA DIRECCIÓN, por lo que actua como ATRIBUTO, NO COMO ENTIDAD.
CREATE TABLE Departamento(
Id_departamento SERIAL,
Nombre VARCHAR(25) NOT NULL,
PRIMARY KEY(Id_depar... | true |
d90f8b4bac952f76c533a4cd491d5651debbfca3 | SQL | Gabor1126/small_neptun_db | /neptun_db_init.sql | UTF-8 | 800 | 2.75 | 3 | [] | no_license | CREATE USER neptun_admin
IDENTIFIED BY "12345678"
DEFAULT TABLESPACE users
QUOTA UNLIMITED ON users
;
GRANT CREATE SESSION TO neptun_admin;
CREATE TABLESPACE neptun_tablespace DATAFILE 'c:\oraclexe\app\oracle\oradata\XE\neptun_tablespace.dbf' SIZE 100M;
ALTER USER neptun_admin QUOTA UNLIMITED ON neptun_table... | true |
470a120c2104ef479bc4c404e4a575488fa8d64e | SQL | yunglong78/ALiPay | /src/main/resources/sql/sps_sys_config.sql | UTF-8 | 580 | 2.78125 | 3 | [] | no_license | CREATE TABLE sps_sys_config(
sysKey VARCHAR(200) NOT NULL COMMENT '参数名',
sysValue TEXT DEFAULT NULL COMMENT '参数值',
modifyTime BIGINT(20) DEFAULT 0 COMMENT '修改日期',
accountId BIGINT(20) DEFAULT 0 COMMENT '修改人',
isCache TINYINT(1) DEFAULT 0 COMMENT '是否缓存,true为是,false不是,默认false',
description VARCHAR(200) DEFAUL... | true |
3c51589458bec6fd448ac2635700b171bce51d5c | SQL | farrrr/sns | /apps/channel/Appinfo/install.sql | UTF-8 | 2,736 | 2.953125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50516
Source Host : 127.0.0.1:3306
Source Database : thinksns
Target Server Type : MYSQL
Target Server Version : 50516
File Encoding : 65001
Date: 2012-10-23 16:57:34
*/
SET FOREIGN_KEY... | true |
f3ea0e3e86e0b71db8b897d446f11cb46bba1b5c | SQL | rrodakowski/bizlistr | /webapp/dal/database/sqlCommands.sql | UTF-8 | 4,503 | 2.78125 | 3 | [] | no_license | /***** User Configuration *****/
INSERT INTO users (email, password)
VALUES ('admin', 'Just4Fun');
/***** Range Configuration *****/
INSERT INTO employee_range (`range`)
VALUES ('5-25');
INSERT INTO employee_range (`range`)
VALUES ('26-50');
INSERT INTO employee_range (`range`)
VALUES ('51-100');
INSERT INTO employe... | true |
36defe2f3f4db346e84e479bd584fa743f0aa511 | SQL | batego/db_fintra | /fintra/public/Tables/agencia_tsp.sql | UTF-8 | 583 | 3.078125 | 3 | [] | no_license | -- Table: agencia_tsp
-- DROP TABLE agencia_tsp;
CREATE TABLE agencia_tsp
(
dstrct character varying(4),
id_agencia character varying(10) NOT NULL,
id_mims character varying(12),
nombre character varying(30),
estado character varying(12),
fecha_cambio_estado date,
codigo_abc character varying(4) NOT NUL... | true |
cb2fdffbd5bdb418fc608fcb68134d013658710d | SQL | amazon-archives/aws-ohdsi-automated-deployment | /Achilles/inst/sql/sql_server/Achilles_v5.sql | UTF-8 | 298,755 | 3.59375 | 4 | [
"Apache-2.0"
] | permissive | /******************************************************************
# @file ACHILLES_v5.SQL
#
# Copyright 2014 Observational Health Data Sciences and Informatics
#
# This file is part of ACHILLES
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complia... | true |
32ee2af8c3a66cb0054e3f1aaecdbd79c3211a85 | SQL | FRopers/Ropersflavien_7_19022021 | /Server/groupomania.sql | UTF-8 | 5,648 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 17 mars 2021 à 11:08
-- Version du serveur : 8.0.21
-- Version de PHP : 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
a10cc12e5534f4d7202d193aff654d5e38aa1e42 | SQL | rharshit/FitnessTracker | /sql/fitnessDump/fitness_food.sql | UTF-8 | 2,811 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: fitness
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
6792e72308de4f707c1e03c150754849c44e252d | SQL | lvxin1986/ClickHouse | /dbms/tests/queries/0_stateless/00937_template_output_format.sql | UTF-8 | 976 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS template;
CREATE TABLE template (s1 String, s2 String, `s 3` String, "s 4" String, n UInt64, d Date) ENGINE = Memory;
INSERT INTO template VALUES
('qwe,rty', 'as"df''gh', '', 'zx\ncv\tbn m', 123, '2016-01-01'),('as"df''gh', '', 'zx\ncv\tbn m', 'qwe,rty', 456, '2016-01-02'),('', 'zx\ncv\tbn m', 'qwe... | true |
1a39eb88b70e05aea89c071493defe8b36af3926 | SQL | DreamWalker1412/SGManager | /sgm.sql | UTF-8 | 2,953 | 3.328125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : sgm
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-06-17 22:49:15
*/
SET FOREIGN_KEY... | true |
8626f0975795fd26bd5d33c694b548eb72fccbb1 | SQL | joe-zhou-hub/joezhou-java-base | /mysql5/src/com/joezhou/dml/数据操作语句.sql | UTF-8 | 1,069 | 3.53125 | 4 | [] | no_license | DROP TABLE IF EXISTS `ACCOUNT`;
CREATE TABLE `ACCOUNT`
(
`ID` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`USERNAME` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '帐号',
`PASSWORD` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '密码',
`CREATE_DATE` DATE COMMENT '注册日期',
PRIMARY KEY (`ID`)
) ... | true |
93049adf437233a6719dac2e36ae3c8e520dbbad | SQL | soon14/project | /data/backup/1460099501/tables/sline_tuan.sql | UTF-8 | 2,790 | 3.4375 | 3 | [] | no_license | -- 表的结构:sline_tuan --
CREATE TABLE `sline_tuan` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`aid` int(11) unsigned DEFAULT NULL COMMENT '前端显示id',
`webid` int(2) unsigned DEFAULT '0' COMMENT '站点id',
`title` varchar(600) DEFAULT NULL COMMENT '团购标题',
`shortname` varchar(255) DEFAULT NULL COMMENT '简称',
`se... | true |
60936c3f38baaa5f9e5f0ef2b37188eedcc2aeb3 | SQL | devcoder111/carproweb | /sql_scripts/update-1.6.3.sql | UTF-8 | 982 | 3.0625 | 3 | [] | no_license | "dont run this file manually!"
CREATE TABLE `visits` (
`id` int(11) NOT NULL,
`date_visit` datetime DEFAULT NULL,
`date_created` datetime DEFAULT NULL,
`date_confirmed` datetime DEFAULT NULL,
`date_canceled` datetime DEFAULT NULL,
`property_id` int(11) NOT NULL,
`message` text NOT NULL,
`client_id` int... | true |
f6634c7fe29880fc0f3f26a6598f42ba0f6f63b5 | SQL | linkshark/linkjb | /src/main/resources/mybatis.sql | UTF-8 | 22,137 | 3.234375 | 3 | [] | no_license | /*
Navicat MariaDB Data Transfer
Source Server : 云主机
Source Server Version : 100036
Source Host : linkjb.com:3306
Source Database : mybatis
Target Server Type : MariaDB
Target Server Version : 100036
File Encoding : 65001
Date: 2019-01-09 16:55:39
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
b2a52f764620cdfc8b811ef0ec2311b20b11aaa0 | SQL | shanghaif/api | /cloudok-starter/src/main/resources/db/migration/mysql/V20210207125100__update_messages.sql | UTF-8 | 382 | 3.078125 | 3 | [] | no_license | ALTER TABLE `uc_message_thread`
CHANGE COLUMN `ower_id` `owner_id` BIGINT(20) NULL DEFAULT NULL COMMENT '归属id,对于私信 不存在归属于谁,对于留言 留给谁的就是谁的' ;
ALTER TABLE `uc_message_thread_members`
ADD COLUMN `member_id` BIGINT(20) NULL AFTER `thread_id`;
ALTER TABLE `uc_message`
ADD COLUMN `member_id` BIGINT(20) NULL AFTER `thre... | true |
728e8f086888f49f9e2bc1f5cd8f0566fcced90d | SQL | miznokruge/bukberstmik | /bb2.sql | UTF-8 | 2,748 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 20, 2014 at 02:21 PM
-- Server version: 5.5.36
-- PHP Version: 5.4.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
a2c7bcceefdeb46c15a42c539e2884f26c5d3cfa | SQL | Guifgr/Meus-Produtos | /Meus Produtos/db/migrations/V1__Create_Table_Person.sql | UTF-8 | 261 | 3.015625 | 3 | [] | no_license | CREATE TABLE `person` (
`user_id` bigint NOT NULL AUTO_INCREMENT,
`user_name` varchar(30) DEFAULT NULL,
`user_password` varchar(20) DEFAULT NULL,
`user_email` varchar(80) DEFAULT NULL,
UNIQUE KEY unique_email (user_email),
PRIMARY KEY (`user_id`)
); | true |
cc5f6673f753554fca181999ac7e9689a55e0104 | SQL | mayurmorin/From-Data-to-Insights-with-Google-Cloud-Platform | /Creating New BigQuery Datasets and Visualizing Insights/Lab 2 - Troubleshooting and Solving Data Join Pitfalls.sql | UTF-8 | 8,521 | 4.28125 | 4 | [] | no_license | # Identifying a key field in our ecommerce dataset
# Identifying Duplicate Records
# How many products are on the website?
#standardSQL
SELECT DISTINCT
productSKU,
v2ProductName
FROM `data-to-insights.ecommerce.all_sessions_raw`
-- Answer: 2,273 products and SKUs
# Does that mean we have 2,273 unique product SKU... | true |
96b56d33f5b7dc72315f18b796b1857e5d753193 | SQL | Tavi66/VideoGameDB | /tables.sql | UTF-8 | 3,352 | 3.9375 | 4 | [] | no_license | #Create VideoGameDB database
CREATE SCHEMA VideoGameDB;
DROP TABLE user;
#create 'user' table
CREATE TABLE user (
name VARCHAR(20) NOT NULL,
username VARCHAR(20),
password VARCHAR(30) NOT NULL,
privilege BIT DEFAULT 0,
PRIMARY KEY (username)
);
#create 'videogame' table
CREATE TABLE videogame(
Title VARCHAR(50),
Relea... | true |
592a63b38186213012ca2d9f7d5ad9fe4fb22363 | SQL | manders87/Redshift-IQVIA-Data-Warehouse | /prod_ptab_F_Interaction_Call.sql | UTF-8 | 13,539 | 3.09375 | 3 | [
"MIT"
] | permissive | --Include all keys and fact attributes from f_interactions_call and excludes deleted records
--Include most commonly used dimensional attributes with high cardinality (territory_type, therapeutic_class, therapeutic_sub_class)
--Creating fact table that includes commonly used dimensional attributes
-- REM Add compr... | true |
d88edc942af31f5c8223a5a03f68980177d4e5c6 | SQL | willxj36/Orifin-Prototype | /DB checks.sql | UTF-8 | 961 | 3.234375 | 3 | [] | no_license | SELECT * FROM users;
SELECT * FROM roles;
SELECT * FROM permissions;
SELECT * FROM rolePermissions;
SELECT * FROM accesstokens;
SELECT * FROM reservationAvailability;
SELECT * FROM reservations;
SELECT * FROM monitors;
SELECT * FROM headsets;
SELECT p.permission FROM permissions p
JOIN rolePermissions rp ON rp.... | true |
a8e0728c85718f97ae2986bb77f4e5ce269f1914 | SQL | VitaliyTomochko/GrowTasks | /Database/Student.sql | UTF-8 | 1,072 | 3.625 | 4 | [] | no_license | CREATE TABLE public.student
(
id integer NOT NULL,
firstname character varying(50) NOT NULL,
surname character varying(50) NOT NULL,
age integer NOT NULL,
sex character(1) NOT NULL,
CONSTRAINT student_pkey PRIMARY KEY (id)
);
INSERT INTO public.student
VALUES (1,'Vasyl','Marvin',20,'M')
,(2,'P... | true |
c0cd96fd13547fe06a32f4e45cedcfc2d5ce41fa | SQL | ChevronAllen/PollWebApp | /database/room_getResponses.sql | UTF-8 | 564 | 3.203125 | 3 | [] | no_license | CREATE DEFINER=`ermine`@`%` PROCEDURE `room_getResponses`(
IN uID VARCHAR(255),
IN uSession VARCHAR(255),
IN rID VARCHAR(255)
)
BEGIN
SET @valid = fn_isValidSession(uID,uSession);
IF (@valid) THEN
SELECT DISTINCT R.responseID, R.questionID, R.roomID, R.responder AS `optionalName`... | true |
6a06c71cc024172a3c16ae391d78a036191ccf37 | SQL | MMeaney/General-Code | /SQL/EDEN/Organisation Request - Edit Organisation Requested.sql | UTF-8 | 826 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | -- ******************************************************************************
-- *** Organisation request: Update the organisation requested
-- *** To change requests if incorrect organisation requested
-- ******************************************************************************
USE [EdenSSO-PRD]
SELE... | true |
ed48378bd001fe5174a3c1a29fd7ee6df2d7687c | SQL | glennimoss/glennimoss | /dotfiles/.sqlplus/sql.sql | UTF-8 | 4,381 | 3.453125 | 3 | [] | no_license | SET echo off
SET verify off
SET define on
SET feedback off
COLUMN var_out NEW_VALUE 2
SELECT '' AS var_out FROM dual WHERE 1=0;
SET feedback on
COLUMN var_out CLEAR
DECLARE
l_sql k.args;
l_inst_id NUMBER := SYS_CONTEXT('userenv', 'instance');
l_sid NUMBER := SYS_CONTEXT('userenv', 'sid');
TYPE r_partition IS ... | true |
17bb85c57558d234f81e50e708b1c8a83c7d8037 | SQL | usmantransdata/sfcrm | /database_backup/trans_data (1).sql | UTF-8 | 47,129 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 13, 2018 at 12:21 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... | true |
7b3f76ac7620e7c88ddef7a9c4773fd4692816e5 | SQL | robgalicia/katsa_php | /Database/Store/sp_tipoviaje_del.sql | UTF-8 | 207 | 2.625 | 3 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS sp_tipoviaje_del $$
CREATE PROCEDURE sp_tipoviaje_del(IN pidtipoviaje int)
begin
delete from tipoviaje
where idtipoviaje=pidtipoviaje;
commit;
end$$
DELIMITER ; | true |
a6f9c523759e81aa3bdf485d510da017785c6db7 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.JobRevokeVIPStatus.PRC | UTF-8 | 4,294 | 3.953125 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[JobRevokeVIPStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[JobRevokeVIPStatus]
GO
CREATE Procedure [dbo].[JobRevokeVIPStatus]
As
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
--************************... | true |
ae95d2794b48aea548f0a8ac4978a0783f03bb4c | SQL | Anderson815/Curso_Em_Video_-_MySQL | /13 - Select(3).sql | UTF-8 | 1,507 | 3.421875 | 3 | [] | no_license | use cadastro;
desc cursos;
select distinct nacionalidade from gafanhotos
order by nacionalidade;
select nacionalidade from gafanhotos
group by nacionalidade;
select nacionalidade, count(*) from gafanhotos;
select nacionalidade, count(*) from gafanhotos
group by nacionalidade
order by nacionalidade;
select nacional... | true |
db10f92bc8973ccaefc2de92aef6144642120675 | SQL | dengbin19910916/pg-test | /src/main/resources/db/migration/V20190919155707__schema.sql | UTF-8 | 8,871 | 3.53125 | 4 | [] | no_license | -- 订单表
create table "order"
(
id bigserial not null,
channel varchar(4) not null,
out_id varchar(100) not null,
shop_code varchar(50) not null,
shop_name varchar(200) not null,
paid_time timestam... | true |
dec55c4df15e76fcb20428a1b8b973d4300497f1 | SQL | katekurilo/site-poetry | /target/SitePoems/WEB-INF/classes/database.sql | WINDOWS-1251 | 2,317 | 3.515625 | 4 | [] | no_license | # -- Table: users
# CREATE TABLE users (
# id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
# username VARCHAR(255) NOT NULL,
# password VARCHAR(255) NOT NULL
# )
# ENGINE = InnoDB;
#
# -- Table: roles
# CREATE TABLE roles (
# id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
# name VARCHAR(1... | true |
7bddbfe983a2c1a586964020b4917bb7fd6020d1 | SQL | adbemmaus/simplitri | /simplitri20170627.sql | UTF-8 | 5,129 | 3.421875 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Hôte : localhost
-- Version du serveur: 5.7.18-log - MySQL Community Server (GPL)
-- SE du serveur: Win64
-- HeidiSQL Version: 9.4.0.5125
-- ---------------------------------------------------... | true |
bc7ac22c20dfb9b4c126907c83b35b09ead851eb | SQL | Joypham/Maintain-data-new-code | /Remove dupdatasource on artist page.sql | UTF-8 | 1,351 | 4.09375 | 4 | [] | no_license | Update datasources
Join (
SELECT
t5.*,
row_number () over ( PARTITION BY t5.artistid, t5.sourceuri,t5.formatid ORDER BY t5.count_distict_youtubeurl_groupby_trackid DESC, t5.Resolution DESC, t5.CreatedAt DESC ) AS rownum
FROM
(
SELECT
t4.artistid,
tracks.title,
tracks.Artist,
t4.count_distict_youtubeurl_gr... | true |
3ced5dbf4fcb86a578b0ae83549a5701aa5297a1 | SQL | d42f/s-eng | /dump.sql | UTF-8 | 5,494 | 3.640625 | 4 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.6.28-log - MySQL Community Server (GPL)
-- ОС Сервера: Win64
-- HeidiSQL Версия: 9.3.0.4984
-- --------------------------------------------------------... | true |
8cb7db6921079e7d666ee44a0a6004b051e0105b | SQL | jeanmisslin/Mobility_Manager | /database/init_tfg universidades.sql | UTF-8 | 31,923 | 3.15625 | 3 | [] | no_license | DROP TABLE IF EXISTS universidades;
CREATE TABLE universidades(
id_universidad INTEGER PRIMARY KEY,
codigo_universidad TEXT,
nombre_universidad TEXT,
pais TEXT,
UNIQUE (codigo_universidad)
);
INSERT INTO universidades (codigo_universidad, nombre_universidad, pais) VALUES(
'RO BACAU01',
'Va... | true |
0343c72ef6ca7e96c8e38ad4f5d64bce81444f0f | SQL | pd2f/FIAP4IA | /Arquitetura de Dados/BI/OLAP/Agregacao.sql | UTF-8 | 800 | 3.5 | 4 | [] | no_license | create or replace view Fato_Loc_View as
with agregacao as(
SELECT
t.day_id, t.day_end_date,t.day_time_span,t.day_description,t.day_of_month,t.day_of_quarter,t.day_of_year,t.month_id,t.month_end_date,t.month_time_span,t.month_description,t.month_of_quarter,t.month_of_year,
c.cliente,
s.status,
v.veicul... | true |
82aaaef4d575e905358aec8c2e43b588f52dba19 | SQL | ben5962/modelisation_planning | /sqlite_crude/respect_vie_privee_we/export.sqlite3.essai_respect_vie_privee.insert.sql | UTF-8 | 3,914 | 2.515625 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE dimanches (i integer not null primary key, date_dim TEXT, trim_dim INTEGER);
INSERT INTO "dimanches" VALUES(1,'2017-12-31',4);
INSERT INTO "dimanches" VALUES(2,'2017-12-24',4);
INSERT INTO "dimanches" VALUES(3,'2017-12-17',4);
INSERT INTO "dimanches" VALUES... | true |
a17c8eecfb4c7208aec27a52e399248bc0a39fc9 | SQL | C4G/BLIS | /htdocs/sqlbuddy/exports/blis_117_export.sql | UTF-8 | 13,016 | 3.203125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | --
-- MySQL 5.0.67
-- Thu, 14 Jan 2010 17:39:27 +0000
--
CREATE TABLE `custom_field_type` (
`id` int(11) unsigned not null auto_increment,
`field_type` varchar(45),
`ts` timestamp not null default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
--... | true |
6e78e877475c75c764216b0dae1b42089d34001b | SQL | afdaapala/earsip | /db_backup/earsip.sql | UTF-8 | 5,874 | 2.84375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 04, 2021 at 01:22 PM
-- Server version: 10.1.40-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 |
3686e133019071c9d2ff62fa601a323d47e56b7f | SQL | kamsellin/ReVac-package | /docs/ddls/sybase/create_cm_proteins_indices.sybase.ddl | UTF-8 | 1,202 | 3.140625 | 3 | [] | no_license | CREATE CLUSTERED INDEX idx_cm_proteins01 ON cm_proteins (protein_id) WITH CONSUMERS=6;
CREATE UNIQUE NONCLUSTERED INDEX pk_cm_proteins ON cm_proteins (cm_proteins_id) WITH CONSUMERS=6;
CREATE NONCLUSTERED INDEX idx_cm_proteins02 ON cm_proteins (cds_id) WITH CONSUMERS=6;
CREATE NONCLUSTERED INDEX idx_cm_proteins03 ON ... | true |
b378dda3039ae2f0a988f61509dcec96f8b694f9 | SQL | tjddnjs600/MuseumProject | /Museum_project/src/main/webapp/resources/dbInfo.sql | UTF-8 | 1,137 | 3.15625 | 3 | [] | no_license | 관리자 테이블
CREATE TABLE tbl_admin(
adid varchar2(10) NOT NULL,
adpwd varchar2(200) NOT NULL,
adnick varchar2(20) NOT null
);
--------------------------------
공지사항 테이블
CREATE TABLE tbl_notice(
nno NUMBER,
ntitle varchar2(1000) NOT NULL,
nwriter varchar2(100) NOT NULL,
n_regdate DATE DEFAULT sysdate,
checkCount number DE... | true |
2cf125b6b0d741078686f47192bd44bf1f5365ec | SQL | annyangya/Face | /flask_face.sql | UTF-8 | 3,285 | 3.296875 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.21)
# Database: flask_food
# Generation Time: 2020-05-29 11:34:38 +0000
# ********************************************... | true |
0e835c21d334b529ad17cdb2ee6f95ae53c934d9 | SQL | FallenMap/SalvandoVidas | /Scripts/(12) Script de creacion de indices.sql | UTF-8 | 965 | 3 | 3 | [] | no_license | -- Script de creación de Indices
-- Se crea un indice en el color de la mascota
-- Los candidatos a adopción suelen estar muy interesados en el color de su mascota
CREATE INDEX indic_MascotaColor ON Mascota(mas_color);
-- Se crea un indice en el sexo de la mascota
-- Los candidatos a adopción suelen estar interesado... | true |
64d90a6f22f7e49550ade63d6d6f233611543b52 | SQL | ArrettB/omni-workspace | /servicetrax/ims/docs/gp-conversion/Update RM00101 UserDefined Field to New Customer Number.sql | UTF-8 | 371 | 2.9375 | 3 | [] | no_license | update RM00101 set USERDEF2=NewCUSTNMBR from RM00101 a inner join (select rtrim(PrimaryKeyField1) CUSTNMBR,rtrim(NewPKField1) NewCUSTNMBR from DYNAMICS..ottDataMapping where MappingType in (1,2,3)
and (PrimaryKeyField1<>NewPKField1) /*Do not attempt to change ID's that don't need to change*/
and INTERID=db_name()
... | true |
bf52211c04f3f2ea795b54af4e4f84a2e7a05484 | SQL | Pritamdaz/E-Travel_Deals | /etravel.sql | UTF-8 | 3,849 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 15, 2016 at 12:39 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
1b0bfafa28b8086c8a02a7ca4bb0eb2fa20a7bd8 | SQL | antian369/zxhg | /install_sql/20120724_add.sql | UTF-8 | 20,587 | 3.265625 | 3 | [] | no_license | ALTER TABLE `pl_dep_info`
CHANGE COLUMN `dep_super` `dep_type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '部门类型' AFTER `dep_fzr`;
ALTER TABLE `pl_user`
ADD COLUMN `zw1` varchar(2) NULL COMMENT '职务一' AFTER `create_user`,
ADD COLUMN `zw2` varchar(2) NULL COMMENT '职务二' AFTER `zw1`,
... | true |
dda00f2541ebe98661cd64896e87dd8f219f425a | SQL | fabio-gz/holbertonschool-web_back_end | /0x0C-MySQL_Advanced/1-country_users.sql | UTF-8 | 217 | 2.96875 | 3 | [] | no_license | -- create table user
CREATE TABLE IF NOT EXISTS users (
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
email VARCHAR(255) NOT NULL UNIQUE,
name VARCHAR(255),
country ENUM('US', 'CO', 'TN') NOT NULL
);
| true |
eb609fb19d2540193432cf0456c6bdb3db9d9780 | SQL | gwgowdey/ITSE2409-Database-Programming | /Lesson 3 - Chapter 3/Lesson 3 - Chapter 3 Assignment/Chapter 3 Assignment.sql | MacCentralEurope | 2,637 | 4.25 | 4 | [] | no_license | /*
Student: Griffin Gowdey.
Instructor: James Gibbs.
Class Number: ITSE2409-86752.
Class Name: Database Programming.
Semester: Spring 2021.
Lesson 3 - Chapter 3 Assignment.
*/
/*
Question 1 - Part 1:
Write a SELECT statement that returns four columns from the Products table: ProductCode,
ProductName, List... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.