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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c724603d0c48c747f61b70f4500d5abcf6e7dd46 | SQL | drda3x/JustDance | /sql/ash.sql | UTF-8 | 1,754 | 3.78125 | 4 | [] | no_license | CREATE DATABASE `@db_name@` /*!40100 DEFAULT CHARACTER SET utf8 */;
CREATE TABLE `@db_name@`.`classes` (
`class_id` int(11) NOT NULL AUTO_INCREMENT,
`class_name` varchar(1) NOT NULL,
PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `@db_name@`.`dancers` (
`dancer_id` int(11) NOT NUL... | true |
d2e5758b69c5a65ae33e8771e80d36f03c77b8c5 | SQL | yichenj/my-gin-server | /sql/init_db.sql | UTF-8 | 217 | 2.53125 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS `demos`;
CREATE TABLE `demos` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255),
`description` VARCHAR(255),
`create_time` DATETIME,
PRIMARY KEY (`id`)
) character set = utf8;
| true |
d5983ac216ac6313ca303c89aed1f34a7228d57f | SQL | JamesSaxon/routing-container | /scripts/run/walking_tracts.sql | UTF-8 | 1,877 | 4.1875 | 4 | [] | no_license | DROP TABLE IF EXISTS park_routing;
CREATE TABLE park_routing (tract BIGINT, park INT, eucl_m INT, routing_m INT, total_m INT);
DO $$DECLARE r record;
BEGIN
FOR r IN
SELECT DISTINCT id tract, point
FROM locations
WHERE dir = 0
ORDER BY tract
-- LIMIT 3
LOOP
BEGIN
RAISE NOTICE 'tract = %', r.trac... | true |
216af2d3a642b2e79596e1464dff343b371b360c | SQL | genoufox/sql-scripts | /完美国际白金用户1014.sql | GB18030 | 2,294 | 3.78125 | 4 | [] | no_license | select a.account as ˺,
b.userid as ˺id,
case b.rank
when 1 then
''
when 2 then
''
when 3 then
''
when 4 then
''
else
'ʧVIP'
end as Ա,
b.truename as vip,
b.mobilephone as vipֻ,
c.pay2... | true |
b0932ca8c71ec49ba55f1dee436e2394bd23dc4a | SQL | leelcn/show | /data/migrations/201506011207_datetime_without_milliseconds.sql | UTF-8 | 727 | 2.609375 | 3 | [] | no_license | ALTER TABLE customers ALTER inserted_ts TYPE timestamp(0) with time zone;
ALTER TABLE cars ALTER last_contact TYPE timestamp(0) with time zone;
ALTER TABLE cars ALTER last_location_time TYPE timestamp(0) with time zone;
ALTER TABLE trips ALTER timestamp_beginning TYPE timestamp(0) with time zone;
ALTER TABLE trips AL... | true |
5fd84b6d8767186f7269a6433c2e520bfc0d0803 | SQL | WillZWL/project | /database/change script/shop.eservicesgroup.com/20150921_7943_PMGW_UI.sql | UTF-8 | 4,087 | 3.046875 | 3 | [] | no_license | INSERT INTO `application` (`id`, `app_name`, `description`, `display_order`, `status`, `display_row`, `url`, `app_group_id`, `create_on`, `create_by`) VALUES ('ORD0031', 'Payment Gateway Admin', 'Payment Gateway Admin', '30', '0', '1', 'order/pmgw_admin', '9', '2015-09-18 18:15:49', 'ping');
INSERT INTO `rights` (`i... | true |
eec3b0ed9a4aaebe623a8f4bba8e3d20b5ee7f55 | SQL | kkarina/MBAD | /sql/multizones.sql | UTF-8 | 525 | 4.125 | 4 | [] | no_license | select z.*, a.department from
(select x.employee_id, x.zone, round(avg(x.duration)) as mean, count(zone), round(stddev_pop(x.duration)) as stdev
from
(select t.*, extract(epoch from t.next_time - t.timestamp) as duration
from
(select p.*, LEAD("timestamp") OVER(partition by employee_id ORDER BY "timestamp"... | true |
6fdc40303e19cf60e8a4df4691b915d6ee8d66ff | SQL | jake-morr/SQL_code_work | /enrollmets_alt_path.sql | UTF-8 | 809 | 4.0625 | 4 | [] | no_license | select distinct StC.person_uid
, StC.academic_period
, AcSt.major_desc "Major"
, AcSt.COLLEGE_DESC "college"
, max(AO.graduated_ind)
from student_course StC
left join
(select person_uid
, academic_period
, major_desc
, primary_program_ind
, COLLEGE_DESC
from academic_stud... | true |
84076185d01c77453593832baf593a9c433ebb03 | SQL | JrMarcosbr/PHP_JS | /banco de dados/horario.sql | UTF-8 | 13,178 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 06-Abr-2020 às 03:14
-- Versão do servidor: 10.3.15-MariaDB
-- versão do PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
3e3518642503c9546d6299c282d1574247da8529 | SQL | Julio-0417/exercicios-MySQL | /exercicio1--20-05.sql | UTF-8 | 1,486 | 3.921875 | 4 | [] | no_license | /*Crie um banco de dados para um serviço de RH de uma empresa, onde o sistema
trabalhará com as informações dos funcionaries desta empresa.
Crie uma tabela de funcionaries e utilizando a habilidade de abstração e determine 5
atributos relevantes dos funcionaries para se trabalhar com o serviço deste RH.
Popule esta tab... | true |
8b69ff9004d71166906d0e0a0d6167099557cc3c | SQL | JeffreyJackovich/beginning_machine_learning_with_aws | /lesson3/topic_a/sql_review.sql | UTF-8 | 1,248 | 4 | 4 | [] | no_license | /*
Lesson 3 - SQL Review
*/
/*
CREATE TABLE- SQL Review
*/
CREATE TABLE customers (
cust_id INTEGER,
company VARCHAR(256),
country VARCHAR(256));
CREATE TABLE orders (
cust_id INTEGER,
order_type VARCHAR(256),
quantity INTEGER);
/*
INSERT INTO - SQL Review
*/
INSERT INTO customers (cu... | true |
ea5f93280fdba3028303a58c388037ac87e9f110 | SQL | vishnuvardhan1807/databasemanagementessentials | /week3/casestudy.sql | UTF-8 | 8,831 | 3.578125 | 4 | [] | no_license | CREATE SCHEMA CASESTUDY;
USE CASESTUDY;
-- creating user table
CREATE TABLE user(
Userid INT PRIMARY KEY,
Username VARCHAR(40) NOT NULL
);
DESC User;
INSERT INTO user VALUES(1,"vishnu");
INSERT INTO user VALUES(2,"sreekar");
INSERT INTO user VALUES(3,"chandu");
INSERT INTO user VALUES(4,"bharath");
INSERT INTO user... | true |
68ace9b2b51b3c3e26e6acab1169979aa3fa288d | SQL | pmatveev/is-2016 | /workspace/Tracker/SQL/auth.sql | UTF-8 | 2,055 | 3.734375 | 4 | [] | no_license | delimiter $$
create function authenticate (
p_user varchar(32),
p_pass varchar(32),
p_conn varchar(32)
) returns varchar(32)
begin
declare ofcr int(32);
declare cookie varchar(32);
declare tmp varchar(10);
select min(id)
into ofcr
from officer
where username = upper(p_user)
and passhash = p_pass
... | true |
c0d7babd793304e21c320994e696f50273fe107b | SQL | mammatus95/wp-wetterturnier | /demodb/rerunrequest.sql | UTF-8 | 283 | 2.65625 | 3 | [] | no_license | CREATE TABLE %table% (
ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
cityID SMALLINT UNSIGNED NOT NULL,
tdate SMALLINT UNSIGNED NOT NULL,
userID BIGINT UNSIGNED NOT NULL,
placed TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
done TIMESTAMP NULL,
PRIMARY KEY (ID)
);
| true |
a14f99c4db0148cca749979216bf6e371aa6511e | SQL | Esparza287/agiliza-project | /docs/Rutina sp_cursos_letras.sql | UTF-8 | 2,274 | 3.953125 | 4 | [] | no_license | -- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE PROCEDURE `sp_cursos_letras` (i... | true |
2da2e5a769440278b8b8e1bcf7b65f7cdeabfb20 | SQL | billpwchan/Test-Automation-Tools-v2.3 | /Backup Files(Old Version)/backup DB/backup DB_7-19.sql | UTF-8 | 458,331 | 2.640625 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE user (idUser integer, login varchar(70), password varchar(45), user_right varchar(70), email varchar(45), name varchar(45), primary key (idUser));
CREATE TABLE test_step_has_script (idtest_step_has_script integer, script_idScript integer not null, test_step_idtest_step integer not null... | true |
51d9157aa997b13f3ca860785d7bf81056a6695a | SQL | jjby95/Work-Cell-Scheduler | /Config/database.sql | UTF-8 | 652 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | -- Database Copyright 2014 by WebIS Spring 2014 License Apache 2.0
DROP TABLE IF EXISTS TrainingMatrix;
CREATE TABLE TrainingMatrix (
person VARCHAR(30),
cell integer,
training VARCHAR(30),
ergonomicscore double
);
INSERT INTO TrainingMatrix (person,cell,training,ergonomicscore) VALUES
('Jennife... | true |
c3d4f5beb690505213827922887b041a22fcc9a7 | SQL | Geng-Innovator/UiTMESamanTrafik-Admin | /uitm_e_saman_trafik.sql | UTF-8 | 23,613 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2018 at 06:01 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
2ac3c4e1b06c8fc507ebcdda098c55ac4786d1ef | SQL | uta8a/gowiki | /configs/migration/000001_create_users_table.up.sql | UTF-8 | 165 | 2.6875 | 3 | [] | no_license | CREATE TABLE users (
id SERIAL NOT NULL,
username varchar(30) NOT NULL,
password_hash text NOT NULL,
UNIQUE (id),
UNIQUE (username),
PRIMARY KEY (id)
);
| true |
cc676810908a466ecff20917acf0482792a212eb | SQL | CUBRID/cubrid-testcases | /sql/_29_CTE_recursive/_05_dml_with_cte/cases/insert_cte_02.sql | UTF-8 | 628 | 3.6875 | 4 | [
"BSD-3-Clause"
] | permissive | drop if exists t1,t2;
create table t1 (a int, b varchar(32));
insert into t1 values(1,'ccc');
insert into t1 values(3,'eee');
create table t2 (c int);
insert into t2 values(3);
--Expect return error: CUBRID allow only UNION ALL in recursive CTE
insert into t2 (
with recursive subquery_t1 as(select a from t1 where... | true |
95bed4b23cb3fb5c1103a771740b6139ee750106 | SQL | evrimulgen/Oracle-DBA-Life | /Advance Tunning Scripts/kept_objects_summary.sql | UTF-8 | 604 | 2.96875 | 3 | [
"MIT"
] | permissive | -------------------------------------------------------------------------------
--
-- Script: kept_objects_summary.sql
-- Purpose: to report how many objects of each type are kept
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: Nabeel Khan
--
-------------------------------------------------------------------------------... | true |
9cda4f68c85686c86698a6120451554c657f1e86 | SQL | travel0891/blueprint | /district.sql | UTF-8 | 629 | 3.140625 | 3 | [] | no_license | -- ----------------------------
-- Table structure for `district`
-- ----------------------------
DROP TABLE IF EXISTS `district`;
CREATE TABLE `district` (
`intId` int(11) NOT NULL AUTO_INCREMENT,
`charId` char(36) NOT NULL,
`city_charId` char(36) NOT NULL,
`name` varchar(50) NOT NULL COMMENT '区域名称',
`sort` ... | true |
6a74554c8bfa30d5c8b67c6f693738f829810f44 | SQL | OrionJoshi/SQL | /Retrieve_data/problem17.sql | UTF-8 | 925 | 3.546875 | 4 | [] | no_license | -- 17. Write a SQL query to show all details of the Prime Ministerial winners
-- after 1972 of Menachem Begin and Yitzhak Rabin.
-- Sample table: nobel_win
-- YEAR SUBJECT WINNER COUNTRY CATEGORY
-- ---- ------------------------- ---------------... | true |
03d2787068bdec4c3efe935ea407d117fe08ced5 | SQL | mikerodionov/ps-scripts | /K2/SQL/ViewK2EnvironmentFields.sql | UTF-8 | 337 | 3.0625 | 3 | [
"MIT"
] | permissive | SELECT [Field].[FieldId], [Field].[FieldName], [FieldValue].[FieldValue]
FROM [Environment].[Field]
INNER JOIN [Environment].[FieldValue] ON [Field].[FieldId] = [FieldValue].[FieldId]
ORDER BY FieldName
--Find and replace example
UPDATE [Environment].[FieldValue]
SET FieldValue = REPLACE(FieldValue, 'FIND WHAT',... | true |
6253e0133643c632f5cbfc1b329437061e8fa373 | SQL | Gonomic/Genealogy-backend | /GoingUpTheFamilyTreeExcerpt.sql | UTF-8 | 5,392 | 3.21875 | 3 | [
"MIT"
] | permissive | going_up: LOOP
INSERT INTO humans.testlog
SET TestLog = CONCAT('TransAction-', IFNULL(NewTransNo, 'null'),
'. TransResult= ', IFNULL(TransResult, ''),
'. =====>> Going up! Getting all ancestors (up until requested ancestor level)'),
TestLogDateTime = NOW();
IF EXISTS (S... | true |
4464944ca0462454a67b45cbad8992db8831b2c7 | SQL | 361754100/sperms | /src/main/resources/sperms.sql | UTF-8 | 14,593 | 3.515625 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost(sperms)
Source Server Version : 50639
Source Host : localhost:3306
Source Database : db_sperms
Target Server Type : MYSQL
Target Server Version : 50639
File Encoding : 65001
Date: 2019-11-27 16:59:15
*/
SET FOREIGN_KEY_CHECK... | true |
435377aa76b679ef756c9d66c25daf8891a5834b | SQL | dirkgroen/CV_APP | /cv-app-sqldb/dwh/Views/vw_DIM_Functie.sql | UTF-8 | 1,313 | 2.796875 | 3 | [] | no_license |
CREATE VIEW [dwh].[vw_DIM_Functie] AS
/*
###################################################################################################################################################################################
-- Object : [dwh].[vw_DIM_Functie]
-- AangemaaktOp : 20200803
-- Auteur : Bijvank... | true |
2134f5956e7bfe1e4cb82514e4d5105480ef1ae0 | SQL | Whiteheadcrab/StaffDatabase-MySQL- | /staffdatabase/First_script.sql | UTF-8 | 415 | 3.0625 | 3 | [] | no_license | Select Full_Name , (Salary_Jan + Salary_Feb + Salary_Mar + Salary_Apr + Salary_May + Salary_June + Salary_July + Salary_Aug + Salary_Sept + Salary_Oct + Salary_Nov + Salary_Dec)
As SumSalary
From second_task_db.staff
where ((Salary_Jan + Salary_Feb + Salary_Mar + Salary_Apr + Salary_May + Salary_June + Salary_July + ... | true |
3522465dccb198f1f05fa8ae3eca49a9cda23047 | SQL | Quozul/EnhancedSurvival | /database.sql | UTF-8 | 578 | 3.390625 | 3 | [] | no_license | create database if not exists `enhanced_survival`;
use `enhanced_survival`;
create table if not exists `user` (
uuid char(36) primary key,
warns integer default 0,
mute_end timestamp default NOW(),
team integer default 0 references `team`(team_id)
);
create table if not exists `team` (
team_id integer... | true |
ecf30b2e30f0bb5b9d03c25469d676948e1f6ab8 | SQL | cjchamila/user-registration | /user-registration/src/main/resources/schema.sql | UTF-8 | 1,314 | 3.84375 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS userregdb;
CREATE TABLE `country` (
`id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `state` (
`id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`country_id` int(11) DEFAULT NULL,
PRIMARY K... | true |
595e97111e3432afaf7a5153df4cb264d96a2f11 | SQL | faisarn/table | /router.sql | UTF-8 | 2,838 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 25, 2019 at 11:28 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
f5adfe5b8ae5cc050a7d44f55da795d0d3b52b54 | SQL | Ambliqui/crud-criteria-clase | /ruben-crud-criteria/gestioncrud_empleado.sql | UTF-8 | 2,288 | 2.921875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `gestioncrud` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `gestioncrud`;
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: gestioncrud
-- ---------------------------------------------... | true |
db48caafb96c90584c9f41103248b1672ad77b38 | SQL | mshotskiy/air-system | /docker/services/mysql/dump.sql | UTF-8 | 7,734 | 3.421875 | 3 | [] | no_license | create table air_company
(
company_id bigint auto_increment,
name varchar(45) not null,
company_type varchar(15) not null,
founded_at date not null,
constraint company_id_UNIQUE
unique (company_id),
constraint name_UNIQUE
unique (name)
)
charset = utf8;
al... | true |
3c6e445b71b0c3f8109ee02ec1797d162ba31696 | SQL | HamzaMohammadKhan/snippets | /instacart_aggregate_queries.sql | UTF-8 | 1,003 | 4.1875 | 4 | [] | no_license | /* Practice Problems 1 */
/* Find the total number of orders placed on the weekend */
select count(*)
from orders where order_dow in (6, 0);
/* Find the highest number of products in an order */
select max(add_to_cart_order)
from order_products;
/* Find the average number of days bet... | true |
b0d505f69d231ede00ae6977db2c1398d3b21c18 | SQL | ninnzz/tubig | /tables.sql | UTF-8 | 741 | 2.9375 | 3 | [] | no_license | CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`mobile_number` varchar(64) NOT NULL,
`token` varchar(128) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `mobule_num` (`mobile_number`)
) ENGINE=Inn... | true |
b0d8cdbc9d7190da13a12a625443d79ba0b13b78 | SQL | VelizarVeli/SoftUni-Software-Engineering | /03.C#DBFundamentals/01.Databases Basics - MS SQL Server/AdditionalExercises/AdditionalExercises/05.AllItemsWithGreaterThanAverageStatistics.sql | UTF-8 | 512 | 3.859375 | 4 | [] | no_license | WITH AVGStats_CTE (AVGSpeed, AVGLuck, AVGMind)
AS
(
SELECT AVG(st.Speed) AS AVGSpeed, AVG(st.Luck) AS AVGLuck, AVG(st.Mind) AS AVGMind
FROM [Statistics] as st
)
SELECT i.Name, i.Price, i.MinLevel, ista.Strength, ista.Defence, ista.Speed, ista.Luck, ista.Mind
FROM Items AS i
INNER JOIN [Statistics] AS ista
ON ista.Id ... | true |
0ee2ecf4f684408c977531b802ae4ea1c32f5c71 | SQL | AvishekaviD/PRM | /CoreBriefs/236.sql | UTF-8 | 13,726 | 3.34375 | 3 | [] | no_license | --bb and datediff(day,lastinteractiondate,getdate()) <= 180
--MO_HA_ _IN0236Recency0to6_20160630_NanditaGodbole
--MO_HA_ _IN0236RecencyMorethan6_20160630_NanditaGodbole
select
distinct 'IN' as market
, case
when lower(a.provider) like '%bebeauti%' then 'BB'
when lower(a.provider) like '%pureit%'... | true |
792736fc776f0bf51d38c57fb42f3346d581d4ff | SQL | OHDSI/OncologyWG | /etl/naaccr-etl/db/migrate/CommonDataModel-5.3.1/Redshift/VocabImport/OMOP CDM redshift vocab load copy concept_ancestor_3_2.sql | UTF-8 | 1,628 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | -- *******************************************************************
-- NAME: OMOP CDM redshift load copy concept_ancestor_3_2.sql
-- DESC: Load concept_ancestor
-- *******************************************************************
-- CHANGE LOG:
-- DATE VERS INITIAL CHANGE DESCRIPTION
-- -----------... | true |
113e8e3722d5ae4227b8cc72ff97b6e57c64956a | SQL | abada/sails-waterlock-jwt-template | /db/sails_jwt_template_v0.0.1.sql | UTF-8 | 8,644 | 2.515625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.6.20, for osx10.7 (x86_64)
--
-- Host: localhost Database: sails_jwt_template
-- ------------------------------------------------------
-- Server version 5.6.20-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
882d6baf805b0cfbba28d9507a86686f4a86f405 | SQL | robin-sharp/fx-trade | /entity-server/src/main/resources/cassandra/entity/003-create_table_tradeuser.cql | UTF-8 | 289 | 2.984375 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS entity.tradeuser(
userId UUID,
loginName text,
fullName text,
creationTime timestamp,
statusChangeTime timestamp,
email text,
PRIMARY KEY(userId)
);
CREATE INDEX IF NOT EXISTS tradeuser_loginname_idx ON entity.tradeuser (loginName); | true |
852d0fa87a77d25fb23e06ca9574fcccb7f587b5 | SQL | godofping/LABS-ADVANCE-DATABASE | /purchase order system/database/db.sql | UTF-8 | 4,577 | 3.40625 | 3 | [] | no_license | /*
SQLyog Ultimate v8.53
MySQL - 5.5.5-10.1.38-MariaDB : Database - pos
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MOD... | true |
a4c815605cd0ca988f6e1a5f3b7cad84ee526f05 | SQL | Abhiramisp/CityHope | /disaster.sql | UTF-8 | 8,829 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 05, 2021 at 06:31 AM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... | true |
ded70e15e7663510eb4a6769aec95e9f89390d32 | SQL | andressito/ProjectBD2019 | /src/test_01.sql | UTF-8 | 649 | 2.59375 | 3 | [] | no_license | --Proposer
insert into Proposer values (1, 1, '2018-06-05 20:00:00');
insert into Proposer values (2, 2, '2018-06-05 20:00:00');
insert into Proposer values (3, 2, '2018-06-05 20:00:00');
-- ETUDE
insert INTO EtudeProjet values(2, 1, FALSE, now(), 10000, 3);
insert INTO EtudeProjet values(2, 2, TRUE, now(), 10000, 3)... | true |
3f190f8f22a49fb0a30e78ebba2fe81082c75583 | SQL | AgostonSzepessy/backend | /create_db.sql | UTF-8 | 4,351 | 4.25 | 4 | [] | no_license | -- ****IMPORTANT********************************************************
-- *********************************************************************
-- * Must create a user called 'movnetuser' before running this script *
-- *********************************************************************
-- *************************... | true |
49bd4b4e1d1b39ab99b99bd21c8f3a523f705cc4 | SQL | fivetran/dbt_netsuite | /models/netsuite2/netsuite2__transaction_details.sql | UTF-8 | 6,993 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | {{ config(enabled=var('netsuite_data_model', 'netsuite') == var('netsuite_data_model_override','netsuite2')) }}
with transactions_with_converted_amounts as (
select *
from {{ref('int_netsuite2__tran_with_converted_amounts')}}
),
accounts as (
select *
from {{ ref('int_netsuite2__accounts') }}
),
ac... | true |
ff1bb8778368677ef250ed62f63df8e5da4e9fb5 | SQL | n2jovano/Nem-s-Repository | /ORACLE_SQL/create_views.sql | UTF-8 | 535 | 2.6875 | 3 | [] | no_license | CREATE VIEW appt_rooms AS
(SELECT appointment.appointment_name, appointment.appointment_date, room.room_label
FROM appointment, room
WHERE appointment.room_id = room.room_id);
CREATE VIEW staff_campus AS
(SELECT staff.name, staff.profession, campus.address
... | true |
872724293e7bc4545bd804d66f6f46d8200006a3 | SQL | BySjm/HeiMa | /Day27/src/高级函数.sql | UTF-8 | 1,211 | 4.03125 | 4 | [] | no_license | -- case表达式【相当于java中swtich语句】
-- 查询每个员工的工资等级并排序
-- 工资等级在1显示为 '努力赚钱'
-- 工资等级在2显示为 '小康生活'
-- 工资等级在3显示为 '可以娶媳妇'
-- 工资等级在4显示为 '可以买车'
-- 工资等级在5显示为 '可以买房'
-- 工资等级不在以上列表中显示为 '土豪'
SELECT
e.`ename`,
s.`grade`,
CASE
s.`grade`
WHEN 1
THEN '努力赚钱'
WHEN 2
THEN '小康生活'
WHEN 3
THEN '可以娶媳妇'
WHEN 4
... | true |
886682e6e2baa1d358fd279de13ba94124d67862 | SQL | kzhdanov/flowers_site_kj | /Flowers.sql | UTF-8 | 8,020 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.11
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Фев 21 2017 г., 05:38
-- Версия сервера: 5.6.25
-- Версия PHP: 5.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... | true |
edf00dd8fc3ca50fa8b70a4dde4e5f50c8ea5e40 | SQL | sebasberra/shu_bases | /scripts/efectores/actualizacion_efectores/actualizacion_regimen_juridico.sql | UTF-8 | 1,088 | 2.546875 | 3 | [] | no_license | DROP TABLE IF EXISTS regimenes_juridicos;
REPLACE INTO versiones VALUES ("efectores","v 0.35a",NOW());
/* regimenes_juridicos */
CREATE TABLE IF NOT EXISTS regimenes_juridicos (
id_regimen_juridico INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
regjurest VARCHAR(15) NOT NULL,
codigo CHAR(2) N... | true |
78c12e5139dadb7d32d7fb55f013c80ec0e7e16a | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day20/select2356.sql | UTF-8 | 191 | 2.78125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-19T23:56:00Z' AND timestamp<'2017-11-20T23:56:00Z' AND SENSOR_ID='29a54790_9e16_4bb6_9985_e58f582f4704'
| true |
e7d71e0f9d732b7985d2a304b54bc53cd21beaec | SQL | TKM-MCA-2020-DBMS-LAB/20MCA236-SHANA-PARWEEN | /CO1/expt 5(function).sql | UTF-8 | 1,148 | 3.140625 | 3 | [] | no_license | use bank_organisation;
Database changed
mysql> select *from customer;
+-----+-----------+-------------+--------+------------+
| cid | cname | location | sex | dob |
+-----+-----------+-------------+--------+------------+
| 1 | SHANA | Kotarakara | female | 1981-10-02 |
| 2 | ANJANA | kalama... | true |
6f1ddec62822a558a93393db410eeed6fb4d92b3 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day16/select0801.sql | UTF-8 | 265 | 2.921875 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2100_10','2052','1413','6066','4222','2065','3061','2206','5074','2209'])
| true |
cdd043fc769ec21708306d705bc0618d4c8512be | SQL | dewayneallen76/quincy_DB_exercises | /sub_queries.sql | UTF-8 | 1,061 | 4.71875 | 5 | [] | no_license | USE employees;
SELECT first_name, last_name, birth_date
FROM employees
WHERE emp_no IN (
SELECT emp_no
FROM dept_manager)
LIMIT 10;
-- Find all the employees with the same hire date as employee 101010 using a sub-query.
SELECT CONCAT(first_name, " ", last_name) AS "Employee Name", hire_date AS "Hire Date"
FROM empl... | true |
4940d27e360bb78f7856003cfc22ff97b491758a | SQL | nutzam/nutzmore | /nutz-integration-shiro/demo/src/main/resources/sqls/acl/role.sql | UTF-8 | 357 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | /*
list.role.by.user.id
*/
SELECT
r.*
FROM
t_role r
LEFT JOIN t_user_role ur ON r.id = ur.r_id
WHERE
ur.u_id = @userId
/*
find.roles.with.user.powerd.info.by.user.id
*/
SELECT
r.*, CASE sur.id IS NULL
WHEN 1 THEN
''
ELSE
'selected'
END AS has_role
FROM
t_role r
LEFT JOIN (
SELECT
*
FROM
t_user_role
WHERE
... | true |
3d9eaf1e8f33813c8b8b20f23357945e13fd3abb | SQL | fofeiji/cloud-storage | /sql语句/productveneerboard.sql | UTF-8 | 2,360 | 2.765625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 192.168.1.184_3306
Source Server Version : 50505
Source Host : 192.168.1.184:3306
Source Database : niucai1
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-05-18 11:33:51
*/
SET FOREIGN_KEY_CH... | true |
55b3ceb68c3fcb4b46102f4fff239b0ef7b71b90 | SQL | betagouv/aplus | /conf/evolutions/default/45.sql | UTF-8 | 158 | 2.71875 | 3 | [
"MIT"
] | permissive | # --- !Ups
CREATE INDEX event_idx_code_creation_date_desc ON event (code, creation_date DESC);
# --- !Downs
DROP INDEX event_idx_code_creation_date_desc;
| true |
124b35e6848af407653a4dcb8411bb21457ee7de | SQL | germanslobo/repdatabase | /BasedeDatosPHP/support/agenda.sql | UTF-8 | 2,491 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 14, 2019 at 08:40 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
b2fc886811d02260972e6f4161320d639f0d1233 | SQL | jbredow/sql-queries | /. archive/Changed_Weekly Revised_DWFEI_SEL_SDTC_BY_rpc_review items.sql | UTF-8 | 3,798 | 2.875 | 3 | [] | no_license | SELECT DISTINCT --PR_MFG_DG_XREF.MASTER_VENDOR_NAME,
CONTACTS.RPC,
DC_SDTC.DIVISION_NAME,
DC_SDTC.REGION_NAME,
DC_SDTC.ACCOUNT_NAME,
DC_SDTC.BRANCH_NK,
DC_SDTC.CUSTOMER_ALPHA,
DC_SDTC.CUSTOMER_NAME,
DC_SDTC.PC,
DC_SDTC.DISC_GRP,
... | true |
8faf02a13fcb6f323b9c6ae94eaed78da11484e8 | SQL | igordbd/AM_PARSE | /modelo.sql | ISO-8859-1 | 47,393 | 3.375 | 3 | [] | no_license | -- Gerado por Oracle SQL Developer Data Modeler 4.1.1.888
-- em: 2016-08-06 14:25:39 BRT
-- site: Oracle Database 11g
-- tipo: Oracle Database 11g
CREATE TABLE ADMINISTRADORA_CARTAO
(
cd_admi_cart NUMBER (2) NOT NULL ,
nm_admi_cart VARCHAR2 (50) NOT NULL ,
cd_cred ... | true |
f235f06d4218b1df1df06d022dd6713fba41ffee | SQL | FendShooter/trainning | /cate.sql | UTF-8 | 227 | 2.53125 | 3 | [] | no_license | create table category(
id serial,
cat_id varchar(7),
cat_name varchar(150),
primary key(cat_id)
);
insert into category(cat_id, cat_name)
values('comp','computer'),('prt','print'),('tab','tablet'),('acc','accessory'); | true |
525c2342e79094777a14990edc68e36ae6582af9 | SQL | Manisha-atos/Oracle | /chp17.sql | UTF-8 | 1,177 | 3.28125 | 3 | [] | no_license |
select * from emp where deptno=20;
SELECT deptno, job, SUM(sal)
FROM emp where deptno=20
group by deptno,job;
SELECT deptno, job, SUM(sal)
FROM emp where deptno=20
GROUP BY ROLLUP(deptno, job)
order by deptno;
SELECT deptno, job,mgr, SUM(sal)
FROM emp where deptno=20
GROUP BY ROLLUP( ... | true |
abd7d8887630e18c1120cb8adf94cab3b6a051fe | SQL | ragh-a-void/DBMS-midsem | /View Commands.sql | UTF-8 | 4,812 | 4.03125 | 4 | [] | no_license | -- The mega role grant all database access to the admin
set role role_distributor;
create role admin;
grant all on tables to admin;
grant admin to administration@Localhost;
-- View 1 - All the Trailer feedback is visible to the distibutor so that they can set the price
CREATE VIEW Trailers_view AS
(SELECT
... | true |
d8264a92852e6ec326149f25ae38f4f7d94d26c2 | SQL | CalleDahlen/Employee-crud-app | /sql/CreateDatabase.sql | UTF-8 | 307 | 2.921875 | 3 | [] | no_license | CREATE DATABASE libraryemployees;
USE libraryemployees;
CREATE TABLE employees (
id int NOT NULL AUTO_INCREMENT,
firstName varchar(50) NOT NULL,
lastName varchar(50) NOT NULL,
salary decimal(18,3),
isCEO BIT NOT NULL,
isManager BIT NOT NULL,
managerID int null,
PRIMARY KEY (id)
);
| true |
32d30786543aa4ac3385b7c95cf679c860490df0 | SQL | joaogdcarvalho/espaco-tp | /EspacoTP/UTIL/MYSQL/PROCS/uspPeriodosBuscar.sql | UTF-8 | 775 | 3.65625 | 4 | [] | no_license | USE `espaco_tp`;
DROP PROCEDURE IF EXISTS `uspPeriodosBuscar`;
USE `espaco_tp`;
DELIMITER $$
CREATE PROCEDURE `uspPeriodosBuscar`(
IN pNumIdAluno INT(11)
)
BEGIN
SELECT
p.id_periodo as 'id_periodo',
p.id_dia_agendamento as 'id_dia_agendamento',
d.dia as 'dia',
p.id_horari... | true |
844811bff6cb873b99aefb548c9d0c35fdec90ac | SQL | MarianaGiraldo/MisionTIC2022-P_Basica | /S6-Java-SQL-Pruebas/model_parking.sql | UTF-8 | 1,518 | 3.140625 | 3 | [] | no_license | /* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 15.1 */
/* Created On : 02-ago.-2021 1:01:34 p. m. */
/* DBMS : MySql */
/* ---------------------------------------------------- */
SET FOREIGN_KEY_CHECKS=0
;
/* Drop Tables */
DROP TABLE IF E... | true |
aa8b884529791797b2240904bbedac6ce5d1e642 | SQL | zerojuls/b2b | /SQL/CUENTA_DC_GET.sql | UTF-8 | 635 | 3.765625 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS CUENTA_DC_GET$$
CREATE PROCEDURE `CUENTA_DC_GET`(
IN P_id_cuenta CHAR(11),
IN P_opcion CHAR(1)
)
BEGIN
CASE P_opcion
WHEN '1' THEN
SELECT
C.id_cuenta,
C.c_codigo,
C.c_cuenta,
C.id_empresa,
E.c_nomraz AS Empresa,
C.c_estado AS Estado
... | true |
6d9e3e441f6a644ec3c27794dc50a64def0f5a3a | SQL | satit13/SQLScripts | /Script โอนข้อมูล stkrefund - ส่งคืน-GRV-GREไปหลังร้าน.sql | UTF-8 | 1,337 | 3.015625 | 3 | [] | no_license | use BCVAT
select * into tempdb.dbo.bcstkrefund
from nebula.bcnp.dbo.bcstkrefund
where (DocNo like '%GRV%' or docno like '%GRE%' ) and YEAR(docdate)>=2014
select * into tempdb.dbo.bcstkrefundsub from nebula.bcnp.dbo.bcstkrefundsub where docno in (select docno from tempdb.dbo.bcstkrefund)
select * into tempdb.dbo... | true |
8dffc06d786fbde3e2fb7d1d4e67846d11a2604d | SQL | adriaanthomas/REST-benchmark-lamp | /sql/create_db.sql | UTF-8 | 408 | 2.921875 | 3 | [] | no_license | drop database if exists rest;
create database rest;
use rest;
create user 'rest'@'localhost' identified by 'rest';
grant select,insert,update,delete on rest.* to 'rest'@'localhost';
CREATE TABLE rest_data2 (
id INT UNSIGNED NOT NULL,
short_string VARCHAR(200) NOT NULL,
long_string VARCHAR(3000) NOT NULL,
int... | true |
0ee6a21e55173e4e1263d457d971b78cc2c8d818 | SQL | annabefsm/mysql | /mysql/locacao-carros.sql | UTF-8 | 4,013 | 3.578125 | 4 | [] | no_license | create database locacaoCarros;
use locacaoCarros;
create table clientes (
idCliente int (11) not null auto_increment primary key,
nome varchar (100) not null,
RG varchar (30) not null,
CPF varchar (30) not null,
CNH varchar (30) not null,
endereco varchar (100) not null,
dataNascimento date not null
);
create table c... | true |
77a9dda422da7d9b5ceea644d234e5e2aa5217bc | SQL | ZachParris/learning-sql-individual-assignment-ZachParris | /22.sql | UTF-8 | 321 | 4.03125 | 4 | [] | no_license | /*Provide a query that shows the # of customers assigned to each sales agent.*/
SELECT DISTINCT TOTAL(Invoice.CustomerId) AS "Total Customers", Employee.FirstName || ' ' || Employee.LastName AS "Sales Agent"
FROM Employee
Join Customer ON Employee.EmployeeId == Invoice.CustomerId
Join Invoice GROUP BY "Sales Agent... | true |
6bb4794a79547728c3d22dbbc0cb1b936d08e629 | SQL | AphelionSoftware/Meerkat | /SQL Solution/Aphelion.Meerkat.DB/Meerkat/Access/Views/vwFormUserMap.sql | UTF-8 | 1,279 | 3.6875 | 4 | [] | no_license | CREATE VIEW Access.vwFormUserMap
as
/*Forms by project*/
select F.Form_ID , acc.UserID
from forms.Form F
INNER JOIN forms.Form_Project FP
on F.Form_ID = FP.Form_ID
INNER JOIN
app.Project P
ON FP.ProjectID = P.ProjectID
inner join Access.User_SystemRole_ProjectProgramme Acc
on p.ProjectID = acc.ProjectID
OR P.... | true |
bffa4a38f3a17ce20ad980084ca018becf679b9f | SQL | lexSerg/SQl | /Lectures/Lesson_1/lesson_1.sql | UTF-8 | 2,118 | 3.8125 | 4 | [] | no_license | SELECT * FROM `june-2020`.students;
SELECT name FROM `june-2020`.students;
SELECT * FROM `june-2020`.students WHERE name LIKE 'O%';
SELECT * FROM `june-2020`.students WHERE name LIKE '%m%';
SELECT * FROM `june-2020`.students WHERE name LIKE '__m%';
SELECT * FROM `june-2020`.students WHERE length(name) = 5;
SELECT * FRO... | true |
342d21b2943cca6290ae647cec8df0b0e3f67c0f | SQL | dragossterpu/gesint | /gesint/src/main/resources/static/sql/functii.sql | UTF-8 | 4,830 | 2.921875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.4.20
-- Dumped by pg_dump version 9.4.20
-- Started on 2019-03-08 12:59:49
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SE... | true |
4b4fd5114af2a8a78df3247dba24be659e256131 | SQL | DanielCender/CST-235-CLC | /Milestone2/create-db.sql | UTF-8 | 1,172 | 4.21875 | 4 | [
"Apache-2.0"
] | permissive | -- Create Schema
DROP TABLE GCU.Users;
DROP TABLE GCU.Posts;
DROP TABLE GCU.Tags;
DROP TABLE GCU.PostTags;
DROP SCHEMA GCU
RESTRICT;
CREATE SCHEMA GCU;
-- Create Tables
CREATE TABLE GCU.Users
(
Email VARCHAR(200) NOT NULL,
FirstName VARCHAR
(50) NOT NULL,
MiddleInitial VARCHAR
(2) NOT NULL,
LastName VARCHAR
(... | true |
17af6f7547a9064e0bec6f86eca58a19b2c13aa5 | SQL | robertjlooby/scotty-story-board | /db/migrations/20170728164046_add_projects_users.sql | UTF-8 | 214 | 3.484375 | 3 | [
"MIT"
] | permissive | CREATE TABLE projects_users (
project_id SERIAL REFERENCES projects(id) ON DELETE CASCADE,
user_id SERIAL REFERENCES users(id) ON DELETE CASCADE
);
CREATE UNIQUE INDEX ON projects_users (project_id, user_id);
| true |
e876082410782f974fdc81b79b4a53bac5a86076 | SQL | anas334/assignments | /sql/11_tbl_supplier.sql | UTF-8 | 1,082 | 2.9375 | 3 | [] | no_license | mysql> desc tbl_supplier;
+--------------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+----------------+
| pk_int_stock_id | int(11) | NO | PRI | NULL | aut... | true |
343bcb1a1297db10f96129aa9eb253a580a1d090 | SQL | K0rdan/SagaSphere_Backend | /sagasphere_mysql/prod/sagasphere_mysql_prod_table_news.sql | UTF-8 | 453 | 2.8125 | 3 | [] | no_license |
-- --------------------------------------------------------
--
-- Structure de la table `news`
--
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`id` int(11) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`title` mediumtext COLLATE utf8mb4_bin NOT NULL,
`userID... | true |
66b782dd586df5c64fb2ef873b4f564e84a8dcea | SQL | VedangJotaniya/EventBooking | /society.sql | UTF-8 | 5,023 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 07, 2020 at 06:08 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 |
36e3adb266f74132d8532d8e620ae9ffe76fdf5b | SQL | Pur777/GraduationProject | /src/main/resources/db/initDB.sql | UTF-8 | 2,051 | 3.9375 | 4 | [] | no_license | DROP TABLE dishes IF EXISTS;
DROP TABLE vote IF EXISTS;
DROP TABLE lunch_menu IF EXISTS;
DROP TABLE user_roles IF EXISTS;
DROP TABLE restaurants IF EXISTS;
DROP TABLE users IF EXISTS;
DROP SEQUENCE global_seq IF EXISTS;
CREATE SEQUENCE GLOBAL_SEQ AS INTEGER START WITH 100000;
CREATE TABLE users
(
id ... | true |
a2754e65ec32502afac2d41f43996f8c41f1b36c | SQL | kknd9819/mjxz | /src/sanliao.sql | UTF-8 | 21,142 | 3.21875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : zz
Source Server Version : 50617
Source Host : localhost:3306
Source Database : sy-yun
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2017-04-08 17:34:22
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
121dcf2c285f2beec8550afbc2a9f18664b391db | SQL | oarthurvictor/codigos | /APBD/ARTHURV_FOLHA.sql | WINDOWS-1250 | 1,459 | 3.375 | 3 | [] | no_license | /* ---------------------------------
CRIANDO AS TABELAS
--------------------------------- */
-- Conectar com o usurio FOLHA
CREATE TABLE T_DEPARTAMENTO
(
COD_DEPTO NUMBER(2),
NOM_DEPTO VARCHAR2(30),
SIGLA_DEPTO VARCHAR2(5),
CONSTRAINT PK_DEPARTAMENTO PRIMARY KEY (COD_DEPTO)
... | true |
73de73480ef66c696a30763f99741501dda4bbd8 | SQL | ragingo/SQLSamples | /Oracle/sql_select_truth_table.sql | UTF-8 | 1,225 | 3.15625 | 3 | [] | no_license | with
data (input1, input2) as (
select 0, 0 from dual union all
select 0, 1 from dual union all
select 1, 0 from dual union all
select 1, 1 from dual
),
data2 as (
select
utl_raw.cast_from_binary_integer(input1) as input1,
utl_raw.cas... | true |
4165c8e9499881ada9a0b69c585f8b93b44dd13d | SQL | 1astkiss/workspace_jsp | /SQL더쉽게더깊게_CD파일/Sample/Ch03/3_3/List3_26.sql | WINDOWS-1252 | 104 | 2.78125 | 3 | [] | no_license | SELECT goods_classify, COUNT(*)
FROM Goods
WHERE goods_classify = 'Ƿ'
GROUP BY goods_classify; | true |
8a4ad68c5ed1907d54d99d58a166a77bdce9ca8f | SQL | DimolSPA/Dimol-Fix-Carteras | /Dimol.Carteras/Dimol.Carteras.Database/dbo/Stored Procedures/Procs2/Horus_Reporte_Remesa.sql | UTF-8 | 5,886 | 2.859375 | 3 | [] | no_license |
Create Procedure Horus_Reporte_Remesa(@codemp integer, @numero integer, @provcli integer) as
SELECT remesas.rem_numero,
remesas.rem_fecemi,
remesas.rem_comentario,
remesas.rem_tiphon,
remesas.rem_valhon,
provcli.pcl_rut,
provcli.pcl_nombre,
... | true |
b78ba798789d9f641d9eded041c2ca46772d97b2 | SQL | Programmersio-IBMi/f_Learning | /MariaDB_Create_Sample_Database.sql | UTF-8 | 828 | 3.15625 | 3 | [
"MIT"
] | permissive | /*
FormaServe IBM i Training
For full disclaimer see https://www.formaserve.co.uk/examples.php
© - FormaServe Systems Ltd. 1990 - 2020
www.FormaServe.co.uk
*/
CREATE DATABASE IF NOT EXISTS FormaServe;
USE FormaServe;
CREATE TABLE IF NOT EXISTS books (
BookID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
T... | true |
c7a5dbbf9c09909ea7ab84d6a208e37666422e1c | SQL | teamlm2/lm2_mgis | /sql/SQL_GNS/buffer_settings_view.sql | UTF-8 | 3,079 | 3.1875 | 3 | [] | no_license | drop view if exists data_landuse.set_landuse_safety_zone;
CREATE OR REPLACE VIEW data_landuse.set_landuse_safety_zone AS
select row_number() over() as id, * from (
select parcel_id::text, p.landuse,
(st_buffer(geometry, (b.buffer_value * (select degrees_value from data_landuse.set_degrees_to_meters where id = 5)/(s... | true |
19709da34958815d872c5f5ae7fe576400fd1f6e | SQL | fstanchese/corporativo | /corporativo/sql/HoraAula/HoraAula_qProfessorHora.sql | UTF-8 | 559 | 3.265625 | 3 | [] | no_license |
select
horaaula.id,
horario.horarioti_id
from
horaaula,
horario
where
horario.id = horaaula.horario_id
and
(
HoraInicio = p_Horario_HoraInicio
and
Semana_Id = nvl( p_Semana_Id ,0)
and
Periodo_Id = nvl( p_Periodo_Id ,0)
and
HorarioTi_Id = nvl( p_HorarioTi_Id ,0)
)
and
p_O_Data betwee... | true |
0a9238578d3fa5041b78a5ab43f09167694c6de3 | SQL | 1748995976/Third_year_2 | /DataBase/实验源码/Lab2/Sql操作文件/create-table.sql | UTF-8 | 1,595 | 3.8125 | 4 | [] | no_license | -- 下面是会员信息
-- pd:办卡日期
-- state=0:该会员卡长期有效
-- state=1:该会员卡当前有效,截止日期为exp
-- state=2:该会员卡无效
CREATE TABLE vip(
vipid CHAR(10),
expense DOUBLE,
state SMALLINT,
pd date,
exp date,
PRIMARY KEY (vipid)
);
-- 下面是消费记录
-- id:消费流水号
-- edate:消费日期
-- monetary:消费金额
CREATE TABLE expenserecord(
id INT,
vipid CHAR(10),
edate d... | true |
65a5efc10720b6f7d29b8b57f37ff7ead75f92c5 | SQL | hongtuky/Data-Management | /5 Database Application and Transaction Management/createTables.sql | UTF-8 | 1,602 | 3.96875 | 4 | [] | no_license | create table USERS (username varchar(20),
password varbinary(20),
salt varbinary(20),
balance int,
PRIMARY KEY (username));
create table RESERVATIONS (reservation_id int IDENTITY(1,1) not null, -- IDENTITY [ (seed , increment) ]
... | true |
00b17cedaa3a9b9af3ec224c1738192c9d16d32d | SQL | Daquer/FitRank | /sql/obtemListaAplicativosTela.sql | UTF-8 | 509 | 3.6875 | 4 | [] | no_license | SELECT pf.id_app,
a.nome,
COUNT(pf.id_publicacao) atividades
FROM post_fitness pf,
pessoa p,
aplicativo a
WHERE p.id_usuario = '877571842254965'
AND p.id_usuario = pf.id_pessoa
AND pf.id_app = a.id_aplicativo
AND pf.modalidade = 'R'
AND (str_to_date... | true |
e00a699d72e4d6a5cfc165a2a66509e68a8dd9dd | SQL | AdvancedDatabases/ZSBD-studies-course | /benchmark/test-sets/set2-geo/3.sql | UTF-8 | 423 | 3.875 | 4 | [] | no_license | select WAREHOUSE_ID, WAREHOUSE_NAME,
(
select count(W2.WAREHOUSE_ID)
from WAREHOUSES W2 join LOCATIONS L2 on W2.LOCATION_ID = L2.LOCATION_ID
where (SDO_GEOM.SDO_DISTANCE(
(L1.GEO_LOCATION),
(L2.GEO_LOCATION),
10,
'unit=KM'
)) < 50
) as NeighboursCount
... | true |
179a976ef6ad01a52758b3422ff2c724324db989 | SQL | herreramaxi/MHIOT | /Temperature.sql | UTF-8 | 195 | 2.953125 | 3 | [] | no_license | create table dbo.Temperature(
Id int not null Identity(1,1),
Temperature decimal(9,2) null,
Humidity decimal(9,2) null,
Date Datetime null,
constraint PK_dbo_Temperature primary key (Id)
); | true |
7447282b823867e25b0c0fa3ae24f67b0a62a1ef | SQL | hossainamzad/FoodShack | /db/migration/migration.sql | UTF-8 | 487 | 3.1875 | 3 | [] | no_license | \c project_dev;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS items;
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
username VARCHAR(255) UNIQUE NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password_digest TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS items (
id SERIAL PRIMARY KEY,
url TEXT ... | true |
e323373c64c026da811a333415896ba7a48f0886 | SQL | ygor-salles/COM231-Banco_de_Dados_II | /AULAS PRÁTICAS/Aula Pratica 2.1 - Indexação 1/scriptIndexação.sql | UTF-8 | 2,882 | 4.03125 | 4 | [] | no_license | --QUESTÃO 1B
CREATE TABLE departamento(
numeroDepto int,
nomeDepto varchar(30) not null,
primary key(numeroDepto)
)
--QUESTÃO 1C
INSERT INTO departamento VALUES (1, 'Recursos Humanos');
INSERT INTO departamento VALUES (2, 'Producao');
INSERT INTO departamento VALUES (3, 'Financeiro');
INSERT INTO departamento VALUES (... | true |
deb3850cabd48e35004a1aa20494a8b7c9801db6 | SQL | tensight/tensight-app | /prisma/migrations/20210307062246_init/migration.sql | UTF-8 | 4,042 | 3.859375 | 4 | [] | no_license | -- CreateTable
CREATE TABLE "account" (
"id" SERIAL NOT NULL,
"compound_id" TEXT NOT NULL,
"user_id" INTEGER NOT NULL,
"provider_type" TEXT NOT NULL,
"provider_id" TEXT NOT NULL,
"provider_account_id" TEXT NOT NULL,
"refresh_token" TEXT,
"access_token" TEXT,
"access_token_expires" TI... | true |
4476cf129ecf3ad71d83a0ee9cbd2744b3f96e4e | SQL | FG6277/AMM2015 | /ProgettoAmm2015/amm15_gerinaFederica.sql | UTF-8 | 5,256 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Creato il: Giu 06, 2016 alle 20:23
-- Versione del server: 5.6.27-0ubuntu1
-- Versione PHP: 5.6.11-1ubuntu3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
3eee6828040e8f80625181bdb6ae3b896bfce2bf | SQL | thiago-z/desktopMundoPlayADM | /MundoPlay/docs/Aula5-ex1/Script banco Informacoes.sql | WINDOWS-1252 | 474 | 2.78125 | 3 | [] | no_license | create database Informacoes
use Informacoes
create table clientes (
id smallint identity primary key,
nome varchar(80) not null,
endereco varchar(80) not null,
cep varchar(9),
bairro varchar(50),
cidade varchar(50),
uf varchar(2),
telefone varchar(15),
cpf varchar(14),
img varchar(200))
insert into clientes (nome,end... | true |
86a741e468b0d14b07c7a0de584e0e2d43795b4c | SQL | JoseCcari/Sonarqube-Calidad-GA | /BD/query.sql | UTF-8 | 7,727 | 3.21875 | 3 | [] | no_license | CREATE DATABASE horarios;
USE horarios;
DROP TABLE IF EXISTS Usuario;
CREATE TABLE Usuario (
codigo varchar(40) NOT NULL,
contrasenia varchar(20) NOT NULL,
tipo int NOT NULL ,
nombre varchar(50) NOT NULL,
apellidos varchar(50) NOT NULL,
correo varchar(50) NOT NULL,
PRIMARY KEY (codigo)
);
DROP... | true |
c0d30d7ea26200791d46bb608c090ace9537f5de | SQL | amakriInti/ADO.Net | /Exo1/TSQL/Requetes simples/CatQte.sql | ISO-8859-2 | 1,149 | 4.375 | 4 | [] | no_license | -- les produits (qt) dans les 2 catgories les meilleures (CA) en 2012
select p.[Name] , SUM(OrderQty) n
from Sales.SalesOrderDetail d
inner join Sales.SalesOrderHeader h on h.SalesOrderID = d.SalesOrderID
inner join Production.Product p on d.ProductID = p.ProductID
inner join Production.ProductSubcategory sc on sc.Pr... | true |
58ff489e2c8fd26e92bbd399339d2c954bd28cd7 | SQL | ezequieltejada/oraclescripts | /auditScriptv2 (Oracle 9i).sql | UTF-8 | 1,704 | 3.484375 | 3 | [] | no_license | #Audit script for Oracle 9i instances.
DEFINE ORA_DB = &1
set term off
set feed off
set linesize 32767
SET PAGESIZE 0
set feedback off
set verify off
SET TRIMSPOOL ON
SET TRIMOUT ON
set serveroutput on
spool Reporte_&ORA_DB\.txt
SELECT 'Tablespace,Total,Ocupado,Porcentaje Ocupado' FROM dual;
SELECT definido.tablesp... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.