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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
96efe8a1cd6d2cb2e13f05211f1710d781884150 | SQL | scchess/LabKey | /server/customModules/janssenreports/resources/queries/targetedms/DeamidationPercentModified.sql | UTF-8 | 2,649 | 3.765625 | 4 | [] | no_license | /*
* Copyright (c) 2016 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 applicab... | true |
0ea43f9b0ebe3db5c1d6a86e85f2ea280aeb0b0e | SQL | MagnusPoppe/TrafficTracker | /queries_traffic.sql | UTF-8 | 1,619 | 4.75 | 5 | [] | no_license | -- GET ALL VISITS WITH A GIVEN SITE ID
SELECT * FROM traffic_sites WHERE siteID=2;
-- GET VISITOR WITH SPESIFIC IP
SELECT * FROM traffic_visitors WHERE ip="128.39.132.140";
-- GET COUNT OF VISITS FOR THIS MONTH:
SELECT COUNT(date) as 'count'
FROM traffic_visits
WHERE (MONTH(date) = MONTH(NOW())) AND (YEAR(date) = YEA... | true |
29710100687c52ae9f2e48eb371c75a047c45d32 | SQL | ilvkas/bdlc-hdfs | /prototype/load_data.sql | UTF-8 | 1,528 | 2.796875 | 3 | [] | no_license | -- --------------------------------------------------
-- USE Table
use bdlc_data_pro;
-- --------------------------------------------------
-- LOAD Data into tables
load data inpath '/user/bd01/pro/covid_data.json' into table covid_19_json;
load data inpath '/user/bd01/pro/USDCHF.txt' into table src_usdchf_txt;
load d... | true |
aa84e439bd68ce114224d6fc4222ed78252e265b | SQL | rafai77/back_almacen | /src/BD.sql | UTF-8 | 41,504 | 3.515625 | 4 | [] | no_license | --Consulatas y creacion de la base de datos;
--entrar a la terminar y crear bd;ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234'
create DATABASE alamacen;
use mysql;
use almacen
create TABLE usuarios
(
id_user INT NOT NULL PRIMARY KEY AUTO_INCREMENT ,
nombre varchar(50) NOT NULL,
... | true |
09d7fe20c59e8d1bde30266eb7a94092bd96fb78 | SQL | ferrizal/rest-commerce | /commerce.sql | UTF-8 | 4,707 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 12, 2016 at 04:25 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
1aff1d1987350a1b1246cb966f1bb8172b46b52f | SQL | ianmichaelxp/JDBC-PostgreSQL | /JDBC BD2/SQL/INSERTS_BD.sql | UTF-8 | 924 | 2.875 | 3 | [] | no_license |
INSERT INTO funcionario (cpf, nome, endereco, funcao, salario)
VALUES
('98765432100', 'Joao Pedro', 'Joao H, 44', 'vendedor', 1200),
('12345678900', 'Pedro Henrique', 'L M H, 585', 'vendedor', 1200),
('12345678909', 'Maria Helena', 'T N S, 123', 'vendedor', 1200),
('55566677700', 'Henrique Pedro', 'j k H, 404', 'supe... | true |
c88a54e629999c1c4209196638f5aa5eda044e1d | SQL | eyjs/workspace-sts-3.9.11.RELEASE | /shop_cart_db_model1/WebContent/SQL/user1_product1_cart1_create.ddl | UTF-8 | 2,076 | 3.6875 | 4 | [] | no_license | DROP TABLE cart1 CASCADE CONSTRAINTS;
DROP TABLE user1 CASCADE CONSTRAINTS;
DROP TABLE product1 CASCADE CONSTRAINTS;
/**********************************/
/* Table Name: product1 */
/**********************************/
CREATE TABLE product1(
p_no NUMBER(10) NULL ,
p_name ... | true |
b0f598c74022ebe77f3859650ee6dbbb7092816b | SQL | mannhuynh/PLSQL-by-Khaled-Part2 | /Section 21 - Managing Dependencies/chapter-21-part-6.sql | UTF-8 | 2,206 | 3.359375 | 3 | [] | no_license | drop table products;
drop table all_products;
drop synonym products ;
create table all_products
(producut_id number,
producut_name varchar2(100),
producut_category varchar2(100)
);
insert into all_products values (1,'Sony 52 Inch/Led M0014','TV');
create or replace synonym products for all_products;
... | true |
f0c222ede063a7dff7cf4a79fd629f9f3d67591b | SQL | hillerlab/CESAR2.0 | /kent/src/hg/lib/bbiChroms.sql | UTF-8 | 557 | 2.90625 | 3 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | # bbiChroms.sql was originally generated by the autoSql program, which also
# generated bbiChroms.c and bbiChroms.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#bigData file names and corresponding chromosome names
CREATE TABLE bbiChroms... | true |
b729d72bfaaca2b58a6fb820ae81ef2d84f2aae6 | SQL | QiuWJ/seckill | /src/main/sql/schema.sql | UTF-8 | 1,797 | 3.875 | 4 | [] | no_license | --数据库初始化脚本
--创建数据库
CREATE DATABASE seckill;
--使用数据库
use seckill;
--创建秒杀库存表
CREATE TABLE seckill(
seckill_id bigint NOT NULL AUTO_INCREMENT COMMENT '商品库存id',
name varchar(120) NOT NULL COMMENT '商品名称',
number int NOT NULL COMMENT '库存数量',
start_time timestamp NOT NULL COMMENT '秒杀开启时间',
end... | true |
9149c4ed5574e4114d8388ea38b83ab989e858e9 | SQL | VERTICA-FAST/FAST | /vsql/SFDC/SF_Opportunity_bkp_16072018.sql | UTF-8 | 50,170 | 2.921875 | 3 | [] | no_license | /****
****Script Name : SF_Opportunity.sql
****Description : Incremental data load for SF_Opportunity
****/
/*Setting timing on */
\timing
/**SET SESSION AUTOCOMMIT TO OFF;**/
--SET SESSION AUTOCOMMIT TO OFF;
\set ON_ERROR_STOP on
CREATE LOCAL TEMP TABLE Start_Time_Tmp ON COMMIT PRESERVE ROWS AS ... | true |
80bfeb9ed04e3b57b3d9fa7fb378c4a12ae8fc78 | SQL | cgsdesign/EmployeeTracker | /db/seeds.sql | UTF-8 | 905 | 3.234375 | 3 | [
"MIT"
] | permissive | USE company_db;
/*
mysql -u root -p
source db/schema.sql*/
/*above says which db using/going into*/
INSERT INTO departments (department_name)
VALUE
('engineering'),
('legal'),
('cleaning')
;
INSERT INTO roles (title, salary, department_id)
VALUE
('Engineering Manager', '50000', 1),
('Engineer', '40000', 1),
('Sr Engi... | true |
a435b516fb3dbfb6ded4882f3364c8378beb878b | SQL | apoorvanasare/datamigration | /DataMigrationScripts/CreateSequenceScript.sql | UTF-8 | 1,503 | 3.625 | 4 | [] | no_license | set define off;
set sqlblanklines off;
SET SERVEROUT ON SIZE 1000000;
SET PAGES 55;
DECLARE
x VARCHAR2 (1000);
maxId NUMBER;
sql_text VARCHAR2 (250);
sql_text_val VARCHAR2 (250);
sql_info VARCHAR2 (4000);
BEGIN
DBMS_OUTPUT.enable (1000000);
... | true |
97950b9964736ebd973b8f436da06e8126f12a78 | SQL | tejack3098/flask-example-project | /dump_sqlite_db.sql | UTF-8 | 542 | 3.5625 | 4 | [] | no_license | PRAGMA foreign_keys = OFF;
BEGIN TRANSACTION;
CREATE TABLE "address" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"street" TEXT NOT NULL,
"city" TEXT NOT NULL
);
CREATE TABLE user (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"... | true |
17436f31a090cedfcda36462d9ac8870cb47e611 | SQL | toto93700/Projets-Scolaire | /Sql Projet Hopital/creation.sql | UTF-8 | 4,377 | 3.390625 | 3 | [] | no_license | ALTER SESSION SET NLS_DATE_FORMAT = 'DD MM YYYY';
DROP TABLE PATHOLOGIES CASCADE CONSTRAINTS;
CREATE TABLE PATHOLOGIES(
CODE NUMBER(4) NOT NULL,
NOM VARCHAR2(20) NOT NULL,
CONSTRAINT pk_pathologies PRIMARY KEY (CODE)
);
DROP TABLE SOINS CASCADE CONSTRAINTS;
CREATE TABLE SOINS(
ID_SOIN ... | true |
8f8a02c60242b24fc03b5f1273ba0fe5c2ccba9b | SQL | anasselbaz0/Video-maker | /db/db.sql | UTF-8 | 7,674 | 3.046875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Wed Dec 12 19:46:53 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
0f6750f321b4771fbb847f6d077d619de84a61ae | SQL | bhild/UnusedPolishedLivedistro | /main.sql | UTF-8 | 514 | 3.328125 | 3 | [] | no_license | .header on
.mode column
CREATE TABLE books
(
title TEXT,
author TEXT,
num_pages INTEGER,
rating DOUBLE,
publication_date DATE
);
INSERT INTO books VALUES
( 'Code Girls','Liza Mundy',355,4.8,2017),
('Calculus','Ron Larson',1124,5.0,2006),
('The Holy Bible','King James',1200,0.5,-140),
('Crime and Punishment'... | true |
f5584a9be859997068bfcf95c0b9ad772dcaa059 | SQL | PAF-Group/GB_Platform | /Database/Table Creation/projectProposals.sql | UTF-8 | 2,293 | 2.890625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: localhost Database: req_project
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... | true |
ea4b1150c6f3f06e4d23589e37504cb8b72f9414 | SQL | AndrewKehr/qualified-challenges | /Module 34/34.6 Creating_relations-_Final_Assignment/src/get-all-books-before-year-by-nationality.sql | UTF-8 | 172 | 3.609375 | 4 | [] | no_license | SELECT
a.*,
b.*
FROM authors a
INNER JOIN books b
ON a.author_id = b.author_id
WHERE a.nationality != 'United States of America'
AND b.publication_year < 2005 | true |
7eed952769a6a164334bf677e5df338ef1e9c14d | SQL | bdmlai/analytics_engineering_marts | /custom/live_vod/hof_plusvod_final.sql | UTF-8 | 11,018 | 3.34375 | 3 | [] | no_license | {{
config({
"schema": 'fds_nplus',
"materialized": 'incremental',"persist_docs": {'relation' : true, 'columns' : true},
"pre-hook":["drop table if exists #hof_live_plus_vod_manual;
select
report_name,event,event_name,event_brand,series_name,event_date,start_timestamp,end_timestamp,content_wwe_id, production_id,... | true |
a9c14e77ded48930d15fe66111418925d87b6bca | SQL | jiangzhenjian/HL7Receiver | /src/hl7receiver-database/src/main/schema/V1.4-schema.sql | UTF-8 | 281 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | /*
Schema V1.4: Add filtered index on log.message
*/
create index log_message_nextattemptdate_ix on log.message (next_attempt_date)
where next_attempt_date is not null;
create index log_message_pid1 on log.message (pid1);
create index log_message_pid2 on log.message (pid2);
| true |
21d757be302a63714c5f3fd644323eeee513a5b6 | SQL | Reza1261/Web-Kumpulan-Jurnal-Mahasiswa | /web/Database/student.sql | UTF-8 | 1,894 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 27, 2015 at 04:27 PM
-- Server version: 5.0.27
-- PHP Version: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
89309f1f902f5e5668648fed3fcba92a4c721c00 | SQL | jipteshm/qaforum_back | /WebContent/dbscript/qams_scripts.sql | UTF-8 | 774 | 3.0625 | 3 | [] | no_license | CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstName` varchar(255) NOT NULL,
`lastName` varchar(255) DEFAULT NULL,
`mobile` varchar(255) NOT NULL,
`email` varchar(255) DEFAULT NULL,
`dateOfBirth` date DEFAULT NULL,
`createDate` datetime DEFAULT NULL,
`userType` int(11) DEFAULT NULL,
... | true |
d0358272139dbce617b8eff257a21eae538124b0 | SQL | medkg15/how-to-train-your-robot | /database/2014_10_30_session_level_data.sql | UTF-8 | 619 | 3 | 3 | [] | no_license | CREATE
ALGORITHM = UNDEFINED
DEFINER = `capstone`@`%`
SQL SECURITY DEFINER
VIEW `session_level_data` AS
SELECT
`session_level`.`session_id` AS `session_id`,
`session_level`.`level_id` AS `level_id`,
`session_level`.`success_attempt_id` AS `success_attempt_id`,
COUNT(`... | true |
9744347624d97e84749fbdf7b93d5c79912d107a | SQL | shawinder/api | /migrations/migration_027.sql | UTF-8 | 4,878 | 3.984375 | 4 | [
"MIT"
] | permissive | -- Redo functions to retrieve localized values
-- Get values from the edit localized table, not the view localized table
CREATE OR REPLACE FUNCTION get_case_edit_localized_values(field text, language text) RETURNS localized_value[]
LANGUAGE sql STABLE
AS $_$
SELECT array_agg((replace(key, field || '_value_', ''), ... | true |
170f5c07147f90faba5dbc53476b64a9cb02e343 | SQL | ptrckbnck/SQLChecker | /examples/complex/Blatt4_reset.sql | UTF-8 | 15,164 | 3.46875 | 3 | [] | no_license | DROP DATABASE IF EXISTS `airport`;
CREATE DATABASE `airport` DEFAULT CHARSET = utf8mb4;
use `airport`;
CREATE TABLE `airport`.`country`
(
`CountryISO3166_2LetterCode` char(2) NOT NULL,
`CountryName` varchar(100) NOT NULL,
PRIMARY KEY (`CountryISO3166_2LetterCode`)
) ENGINE = InnoDB
... | true |
62cfe997fa5d0baf3f829e2c35c172c969d00ef4 | SQL | wmvlevsk/priceless-points | /db/tables/REF_POINTS.sql | UTF-8 | 357 | 2.953125 | 3 | [] | no_license | USE POINTS;
CREATE TABLE IF NOT EXISTS POINTS.REF_POINTS (
EMPLOYEE_ID INT NOT NULL,
FIRST_NAME VARCHAR(255) NOT NULL,
LAST_NAME VARCHAR(255) NOT NULL,
Q1_PTS INT,
Q2_PTS INT,
Q3_PTS INT,
Q4_PTS INT,
ENT_DT TIMESTAMP NOT NULL,
PRIMARY KEY (EMPLOYEE_ID),
FOREIGN KEY (EMPLOYEE_ID)... | true |
d29a198ad8d18500f664cffb8262ca5a1f4853c1 | SQL | ashishkush/qiime_web_app | /database/procedures/get_minimal_mapping_data.sql | UTF-8 | 565 | 2.96875 | 3 | [] | no_license | create or replace
procedure get_minimal_mapping_data
(
run_id in varchar2,
mapping_values in out types.ref_cursor
)
as
begin
open mapping_values for
'select distinct s.sample_name, m.barcode,concat(m.linker, m.primer),m.region, m.experiment_title
from SEQUENCE_PREP m
inner join SAMPLE s
... | true |
b4652259bd9cdb00adbb5d1ab2a17738d9e1f975 | SQL | SimonePerucino/db-hotel | /query2.sql | UTF-8 | 1,723 | 3.953125 | 4 | [] | no_license | -- join
-- 1.Come si chiamano gli ospiti che hanno fatto più didue prenotazioni?
SELECT `ospiti`.`name`,
`ospiti`.`lastname`,
COUNT(`prenotazioni_has_ospiti`.`prenotazione_id`) AS `Prenotazioni`
FROM `prenotazioni_has_ospiti`
LEFT JOIN `ospiti`
ON `prenotazioni_has_ospiti`.`ospite_id` = `ospiti`.`i... | true |
d5aaa2a8d1bb4a1f4bb2342b93a7a1476346e923 | SQL | BingHuang-Chin/IS212-LMS-Back | /hasura-migrations/migrations/default/1635736053438_set_fk_public_course_materials_section_id/up.sql | UTF-8 | 199 | 2.84375 | 3 | [] | no_license | alter table "public"."course_materials"
add constraint "course_materials_section_id_fkey"
foreign key ("section_id")
references "public"."section"
("id") on update cascade on delete cascade;
| true |
de0eaca2a1a2281f095cb39567c047556a9f1c3d | SQL | mmen/myapp | /mvc/db/tuto-after-model.sql | UTF-8 | 3,759 | 3.140625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Hôte: 127.0.0.1
-- Version du serveur: 8.0.16 - MySQL Community Server - GPL
-- SE du serveur: Win64
-- HeidiSQL Version: 11.3.0.6295
-- --------------------------------------------------------
/... | true |
462e62a3167fb7bbad99b20c7585c06a4b0b7d88 | SQL | Hadden-Industries/oracle | /USERS/RD/FUNCTIONS/IS_UUID.sql | UTF-8 | 812 | 2.890625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | CREATE OR REPLACE
FUNCTION IS_UUID(gText IN VARCHAR2)
RETURN NUMBER
DETERMINISTIC PARALLEL_ENABLE
AS
PRAGMA UDF;
BEGIN
RETURN CASE
WHEN REGEXP_LIKE
(
REPLACE
(
RTRIM
(
LTRIM(gText, '{'),
'}'
),
... | true |
01b03902f2dc23595ec3015aaa8aa5c862d4080c | SQL | bethanymbaker/arch | /scripts/netflix.sql | UTF-8 | 1,106 | 4.15625 | 4 | [] | no_license | Given the following tables/dataframes:
- device (device_id, device_category)
- user (user_id, country)
- playback (date, user_id, device_id, title_id)
- title (title_id, title_name)
1. Number of monthly users that watched Stranger Things since 1/1/2019 sorted by year and month
Output format
year month cnt
2019 1 ... | true |
6e54989d9dec1030f4e28959d45988f7f09b5925 | SQL | ArchitectureSoftware2016I/GymShop | /TiendaJEE/data.sql | UTF-8 | 2,358 | 2.921875 | 3 | [] | no_license |
-- -----------------------------------------------------
-- Data for table `tienda`.`Rol`
-- -----------------------------------------------------
START TRANSACTION;
USE `tienda`;
INSERT INTO `tienda`.`Rol` (`name`) VALUES ('admin');
COMMIT;
-- -----------------------------------------------------
-- Data for table... | true |
53aadb907162cd79c6b2c66bb4fc7316a7d18e62 | SQL | fastz123/4th_revolution | /4th_revolution-master/4th_revolution-master/bigdata/bigdata/home.selection/bigdata/sql/sql_code/0_sql_test__BI.sql | UTF-8 | 5,002 | 3.78125 | 4 | [] | no_license |
# sales database 생성
# sales database 선택
# test table 생성
# test column 생성 - datatype - DECIMAL(5,3)
# 값 10.5 입력
# test테이블 출력
# 값 입력 - 12.55555
## 칼럼 추가 `test_fl` - FLOAT(5,3) NULL AFTER `test`
## 값 입력 - test_fl : 14.55555 / test : 16.55555
## test table 삭제
/*
sales 테이블 생성
purc... | true |
499898cef37cba2d81cebb399ed3553dda46e0e4 | SQL | danaher-j/code-wars | /SQL/8kyu/Grasshopper___Terminal_game_move_function.sql | UTF-8 | 639 | 3.578125 | 4 | [] | no_license | /* Grasshopper - Terminal game move function
Terminal game move function
In this game, the hero moves from left to right. The player rolls the dice and moves the number of spaces indicated by the dice two times.
In SQL, you will be given a table moves with columns position and roll. Return a table which uses the curr... | true |
0ab09fdca38c6948977a2f15f26e17883d58dd9e | SQL | roger2702/teste-para-assessor-de-suporte | /CriarTabelaProduto.sql | UTF-8 | 599 | 3.171875 | 3 | [] | no_license | /* Aqui é usado os comandos para criar a tabela produto junto com suas colunas,
em algumas colunas escolhi usar o varchar por se adequar melhor ao tipo de dado,
no id, optei por "serial" por ele criar uma coluna do tipo integer com uma sequence associada,
responsável por incrementar o número e na coluna preço optei pe... | true |
ab76903dc1dcd7a76d900ce134cf4c3d58ecdfa0 | SQL | Nizar4790k/Sistema-de-Facturacion | /bin/modelo/SQL Scripts/CrearTablas.sql | UTF-8 | 1,665 | 3.375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `sistema_de_facturacion`;
USE `sistema_de_facturacion`;
DROP TABLE IF EXISTS `cliente`;
CREATE TABLE `cliente` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(45) DEFAULT NULL,
`apellido` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`telefono` varchar(... | true |
590ab9ee2a39309007f1c8bb4faa7ad4e93cd95d | SQL | Abyss281290/imagefolio | /sql/premier.sql | UTF-8 | 1,738 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 08, 2011 at 06:25 PM
-- Server version: 5.5.14
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
ed52898387b78d4bce97a2c64446aed4582e0caf | SQL | stroops/lumenshine-backend | /admin/db-files/migrations_src/00002_initial_data.sql | UTF-8 | 3,889 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | -- +goose Up
-- SQL in this section is executed when the migration is applied.
INSERT INTO admin_group (name, updated_by) VALUES('Administrators', 'System');
INSERT INTO admin_group (name, updated_by) VALUES('Service', 'System');
INSERT INTO admin_group (name, updated_by) VALUES('Developers', 'System');
-- initial pw... | true |
ab07b916e70c79e857ff593ccffe3bdf6ce5101c | SQL | ENTS-Source/MasterControl | /migrate.sql | UTF-8 | 1,777 | 3.3125 | 3 | [] | no_license | USE `mcpdev`;
RENAME TABLE `members` TO `__members_old`;
RENAME TABLE `doors` TO `__doors_old`;
RENAME TABLE `door_logs` TO `__door_logs_old`;
RENAME TABLE `certifications` TO `__certifications_old`;
RENAME TABLE `merchants` TO `__merchants_old`;
RENAME TABLE `transactions` TO `__transactions_old`;
RENAME TABLE `walle... | true |
758906947cdda74338a5114d0fc15b81490f862a | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day10/select1502.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-09T15:02:00Z' AND timestamp<'2017-11-10T15:02:00Z' AND temperature>=34 AND temperature<=49
| true |
069201b06e9e2e6614021ff0f654182e73189e64 | SQL | juagarmar/SQL-training- | /SQL easy app/Table and Data.sql | UTF-8 | 2,022 | 3.59375 | 4 | [] | no_license | CREATE TABLE EMP (
Empno INT PRIMARY KEY,
Ename varchar(255) NOT NULL,
Job varchar(255),
Mgr INT,
Hiderdate date,
Sal INT,
Comm INT);
#ADD new column#
ALTER TABLE EMP
ADD deptno INT;
#CREATE A NEW_TABLE#
CREATE TABLE DEPT(
Deptno INT PRIMARY KEY,
Dname INT NOT NULL,
Location INT);
#ADD FOREIGN_KEY#
ALTER TABLE EMP... | true |
c8c92d645fed3999cca60d32067d17d0565ea7bd | SQL | nhathuy0990905/pisoftware | /database/picompany.sql | UTF-8 | 3,365 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 03, 2021 at 05:55 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
244ced9c88d0bfbdab155e7ed7ae46683fb4b5c5 | SQL | marcelobeckmann/trademiner | /REPOSITORY/views/news_plot.sql | UTF-8 | 1,013 | 3.671875 | 4 | [] | no_license | /*
SELECT last as `last price`, utc_time_ as `utc time` , class AS label FROM MKTDATA a WHERE a.symbol='MSFT'
AND date_ = STR_TO_DATE('2013/08/14','%Y/%m/%d')
ORDER BY utc_time_
*/
SELECT n.`next_trade_time` , n.`Title` ,label FROM alignment a , rss n WHERE a.news_id=n.id AND a.ticket LIKE '%20150903... | true |
ebe43be958a23b3c3d0bd8e8e4bcc2e075a0d77d | SQL | DSShrinivasaRao/EmployeeDatabase | /details.sql | UTF-8 | 1,605 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 19, 2020 at 07:09 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
45fc94db9e73eae19b2563a90e75170ee11e679a | SQL | anishbasu/mini-db | /test/test_script.sql | UTF-8 | 347 | 2.59375 | 3 | [] | no_license | CREATE TABLE abc FIELDS (Field1=int, Field2=str)
INSERT INTO abc (Field1=19,Field2='Hello World')
INSERT INTO abc (Field1=20,Field2='Hello World')
INSERT INTO abc (Field1=21,Field2='Hello World')
SELECT * FROM abc WHERE Field1=19
UPDATE abc SET Field1=20 WHERE Field2='Hello World'
SELECT * FROM abc WHERE Field1=20
DELE... | true |
aca2a147395d3c09b8f7ec2052c55993c9f50d33 | SQL | agoetc/Metamor | /conf/evolutions/default/10.sql | UTF-8 | 568 | 3.59375 | 4 | [] | no_license | -- 創作者通知
# --- !Ups
CREATE TABLE creators_notifications(
id BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
creator_id VARCHAR(20) NOT NULL,
from_creator_id VARCHAR(20) NOT NULL,
activity_id BIGINT NOT NULL,
activity_type ENUM('world_created'),
created_at timestamp not null default current_timestamp,
updated... | true |
822fb885d1a45cc0714a21da060e7544628ae8f1 | SQL | alissonads/PHP | /use a cabeça php e mysql/5 - guitarwars/guitarwars.sql | UTF-8 | 484 | 3 | 3 | [
"MIT"
] | permissive | create database if not exists gwdb
default charset utf8
default collate utf8_general_ci;
use gwdb;
create table if not exists guitarwars (
`id` int not null auto_increment,
`date` timestamp default current_timestamp,
`name` varchar(32),
`score` int,
`screenshot` varchar(64),
primary key(id),
... | true |
ec53bc314531ee0a89f4cdbb63f32eba9a4464f6 | SQL | tshavor/chinook_database | /ChinookDatabase1.4_CompleteVersion/SalesAgentInvoices.sql | UTF-8 | 220 | 3.484375 | 3 | [] | no_license | SELECT Employee.FirstName || " " || Employee.LastName as "Full Name",
Invoice.*
FROM Employee
JOIN Customer on EmployeeId = SupportRepId
JOIN Invoice on Invoice.CustomerId = Customer.CustomerId
ORDER BY Employee.LastName | true |
32a564a104c5e029300df4744ed091247445585f | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/procedures/change_item_grp.prc | UTF-8 | 1,916 | 3.5 | 4 | [] | no_license | DROP PROCEDURE CPI.CHANGE_ITEM_GRP;
CREATE OR REPLACE PROCEDURE CPI.CHANGE_ITEM_GRP (
p_par_id IN GIPI_WITEM.par_id%TYPE,
p_pack_pol_flag IN VARCHAR2)
AS
/*
** Created by : Mark JM
** Date Created : 06.03.2010
** Reference By : (GIPIS031 - Endt Basic Information)
** Description : Updates the item group... | true |
71b2a81c0a4ed08c290160c0ebac4eea6c604e3a | SQL | nyeinsuaye/SE_BIOS | /app/web/WEB-INF/classes/sql/create-tables.sql | UTF-8 | 4,059 | 3.640625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS student(
user_id VARCHAR(55) NOT NULL,
name VARCHAR(55) NOT NULL,
password VARCHAR(55) NOT NULL,
edollar DECIMAL(5,2) NOT NULL,
school VARCHAR(128) NOT NULL,
excess_edollar DECIMAL(5,2) NULL,
CONSTRAINT student_pk PRIMARY KEY(user_id)
);
CREATE TABLE IF NOT EXISTS course(
course VARCHAR(10)... | true |
6608815f36c1b3669a2a163ac55689bf6ce5caf5 | SQL | PeterRichardsWA/DojoStoreEcommerce | /db/store.sql | UTF-8 | 8,805 | 3.359375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 10, 2015 at 11:46 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
2b7e36a1dc59c673d7e27693d5a4432f2572f0aa | SQL | MattByers/NWEN304-GroupProject | /sQL/createTables.sql | UTF-8 | 1,130 | 3.609375 | 4 | [] | no_license | CREATE TABLE users(
userID serial Primary Key,
username VARCHAR(64) UNIQUE,
password VARCHAR(60), /*The password digests will only be 60 chars, this can be changed*/
email VARCHAR(64),
first_name VARCHAR(32),
last_name VARCHAR(32),
address VARCHAR(64)
);
CREATE TABLE product_types(
product_type VARCHAR(64) Primary K... | true |
5d119ea2c4ec62ab7efe1374e3b074022fe0b9d9 | SQL | luoyefeiwu/learn_java | /ee19_crm/db/crm.sql | UTF-8 | 3,722 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | create database if not exists `ee19_crmdb`;
USE `ee19_crmdb`;
CREATE TABLE `crm_department` (
`depId` varchar(255) NOT NULL PRIMARY KEY,
`depName` varchar(50) DEFAULT NULL
);
insert into `crm_department`(`depId`,`depName`)
values ('2c9091c14c78e58b014c78e67de10001','java学院'),
('2c9091c14c78e58b014c78e68ded0... | true |
831abe6061a7292e69a41c16ba55301d997de3ef | SQL | mauro8792/PHPBeer | /beercharge.sql | UTF-8 | 8,139 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-11-2017 a las 22:40:41
-- Versión del servidor: 10.1.25-MariaDB
-- Versión de PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
02558ff8370b8cccabdae82188685defb4093e56 | SQL | iambashir/WebProject | /Hibernate_jsf_Cruds/hibernatejsfcrud 20200127 1809.sql | UTF-8 | 2,665 | 2.71875 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.41-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO... | true |
dd186938cb443184607230f2c67a62b0b67d9ba7 | SQL | shaosh/SQLZoo | /SQL Exercise/The Join Operation.sql | UTF-8 | 4,031 | 4.59375 | 5 | [] | no_license | //http://sqlzoo.net/wiki/The_JOIN_operation
//Table game: id, madate, stadium, team1, team2
//Table goal: matchid, teamid, player, gtime
//Table eteam: id, teamname, coach
//1.
//The first example shows the goal scored by 'Bender'.
//Show matchid and player name for all goals scored by Germany. teamid = 'GER'
SELECT... | true |
b46bd412226320ef75b8f428b088f336afa207b5 | SQL | gabrielferreirah/ExerciciosDB | /ExercicioDB01/src/conexao/Estrutura.sql | UTF-8 | 362 | 2.671875 | 3 | [] | no_license | DROP DATABASE IF EXISTS exercicio_database_01;
CREATE DATABASE IF NOT EXISTS exercicio_database_01;
USE exercicio_database_01;
CREATE TABLE alunos(
id INT AUTO_INCREMENT PRIMARY KEY,
nome VARCHAR(200)NOT NULL,
matricula VARCHAR(100),
nota_01 FLOAT,
nota_02 FLOAT,
nota... | true |
b537b2061ae80b167554a40d00491cb6aaa6b162 | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.LotSerMst_InvtId_SiteId_Whse.sql | UTF-8 | 334 | 2.9375 | 3 | [] | no_license | Create Proc LotSerMst_InvtId_SiteId_Whse @parm1 varchar ( 24), @parm2 varchar ( 10), @parm3 varchar ( 10) as
Select * from LotSerMst where InvtId = @parm1
and SiteId = @parm2
and Whseloc Like @parm3
order by InvtId, SiteId, LotSerNbr... | true |
02a6c6a13c1ee7b75693196dc5fbf7adabf34c1b | SQL | nellen-IT/abcVote | /bulletinBoard/doc/10_CreateDB_abcVote.sql | UTF-8 | 5,004 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 16. Jan 2017 um 20:56
-- Server Version: 5.5.53-0+deb8u1
-- PHP-Version: 5.6.29-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
e0a34f0acd46fddaa4ad1b092251ad6a99f83ffd | SQL | aik10/test | /magDB/tables/t_log_type.sql | UTF-8 | 602 | 3.71875 | 4 | [
"BSD-3-Clause"
] | permissive | -- Table: t_log_type
-- DROP TABLE t_log_type;
CREATE TABLE t_log_type
(
c_code text, -- код типа (add/sale) = (добавлено/продано)
c_text text -- название типа
)
WITH (
OIDS=FALSE
);
ALTER TABLE t_log_type
OWNER TO postgres;
COMMENT ON COLUMN t_log_type.c_code IS 'код типа (add/sale) = (добавлено/продано)';
C... | true |
09f3aa4c907af00476f7f9c5876f9bca653e8ebd | SQL | 200727-java-ng-usf/team-x-project2-spring | /sql/project2.sql | UTF-8 | 1,501 | 3.734375 | 4 | [] | no_license | create table user_roles(
role_id serial,
role_name varchar(25) unique not null,
constraint user_roles_pk
primary key (role_id)
);
create table users (
user_id serial unique not null,
username varchar(25) unique not null,
user_password varchar(25) not null,
first_name varchar(25),
last_name varchar(25),
em... | true |
450ef088f918898b595397ec536403aba1c31911 | SQL | VijayMVC/JCC-Data-Warehouse | /SQLDB/dbo/Views/AA_REP_NOMINAL_TRANS_VIEW.sql | UTF-8 | 6,662 | 2.609375 | 3 | [] | no_license | CREATE VIEW AA_REP_NOMINAL_TRANS_VIEW
/*
** Written: 01/07/2005 RV
** Last Amended: 05/07/05 RV, 22/08/05 RV, 24/08/05 RV, 25/08/05 RV, 27/09/2005 SB, 28/09/2005
** Comments: returns selected nominal transaction headers and details for nominal voucher crystal reports
*/
AS
SELECT
NL_TRANSACTIONS.NT_DATE,
CAST ... | true |
ec051a6c590a279144c8e401a6f9b01a3ee10095 | SQL | lsaFreedev/Portfolio | /__bdd/portfolio_07_02_2014.sql | UTF-8 | 11,503 | 3.375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Ven 07 Février 2014 à 17:47
-- Version du serveur: 5.6.12-log
-- Version de PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
882f7d20f3ee338350bfdc755e62ee8d8e9a862e | SQL | Cip09/OrderManagement | /data_base.sql | UTF-8 | 1,028 | 3.671875 | 4 | [] | no_license | /*
drop table if exists `order`;
drop table if exists `product`;
drop table if exists `client`;
*/
drop table if exists `client`;
create table if not exists `client`(
`id` int(10) not null auto_increment,
`name` varchar(40) default null,
`age` int(10) default null,
primary key (id)
);
insert into `client` values (2... | true |
258e16fb7a34e889a3d670779f9c93a05d9fc6bb | SQL | Bishwagitdas/OBJECT-ORIENTED-PROGRAMMING-1 | /Restaurant Management System/oop1.sql | UTF-8 | 3,913 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2019 at 12:39 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
af2bd94e1d4ccbc4f2f53e279b70140a4d676cbe | SQL | mygithubwork/Combinationforspringsecurity | /metro/bumr_trigger.sql | UTF-8 | 3,540 | 4.40625 | 4 | [] | no_license | #品牌联合会员报表
##########################################################
DROP TABLE IF EXISTS brandunionmember_report;
#联合会员报表
CREATE TABLE `brandunionmember_report` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`cardNumber` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`b... | true |
e9d69da2593af230c375896f77e839962e66a021 | SQL | CUBRID/cubrid-testcases | /sql/_23_apricot_qa/_03_i18n/zh_CN/_03_string_func/cases/_002_field.sql | UTF-8 | 1,407 | 3.015625 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set names utf8;
CREATE TABLE test_tr (
id int NOT NULL,
name VARCHAR(20) collate utf8_gen);
insert into test_tr values (1,'测试');
insert into test_tr values (2,'我们');
insert into test_tr values (3,'我们');
insert into test_tr values (103,'我们');
insert into test_tr values (203,'我们');
i... | true |
8adcae7cbb085dcd629dcc0d3b0e7a4225a0eec3 | SQL | device42/DOQL_scripts_examples | /Unreleased Versions/power_ru.sql | UTF-8 | 2,165 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | /*
view_rudata_v2 measure_type_id keys:
20 : PDU_CURRENT
22 : PDU_ENERGY_ACTIVE
24 : PDU_LINE_UTIL
26 : PDU_POWER_ACTIVE
30 : PDU_RATED_POWER
31 : PDU_REACTANCE
33 : PDU_VOLTAGE
35 : PDU_STATUS
37 : PDU_POWER_APPARENT
39 : PDU_FREQUENCY... | true |
020a3b0af815018ded0b3af7e6ad385b9701cd19 | SQL | Khachatur86/Netology.Python-13.lesson-2.4 | /Migrations/170_ELCODATA_Object_createObject.sql | UTF-8 | 1,032 | 3.03125 | 3 | [] | no_license | /******************************************************************************************
Create objects in T_OBJECT
*******************************************************************************************/
-- Create 'Associated Sub FIN CI' in T_OBJECT
IF NOT EXISTS(
SELECT * FROM T_OBJECT
WHERE label = ... | true |
698cd5322d5c09c796e8da7ff585cbaedae7890d | SQL | Retno/code-for-inu | /product/ALL SQL/jbsuser.sql | UTF-8 | 11,251 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 05, 2013 at 12:57 AM
-- Server version: 5.1.33
-- PHP Version: 5.2.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
aec489d50cb1cf30e4b86c21eb88b8b0bd324458 | SQL | leandro-ss/script_misc | /oracle/_util/locked.sql | UTF-8 | 4,212 | 2.859375 | 3 | [] | no_license | col object format a30
col username format a30
col osuser format a30
SELECT
l1.sid sid_locking,
s1.serial# serial#_locking,
s1.username user_locking,
s1.osuser osuser_locking,
s1.sql_hash_value hash_value_locking,
'IS BLOCKING',
l2.sid sid_blocked,
s2.serial# serial#_blocked,
s2.username user_blocke... | true |
f3d4e7565778dc7ffa10e027cf42b94fc2d9209b | SQL | jkohrt7/Employee_CMS | /db/seeds.sql | UTF-8 | 375 | 2.75 | 3 | [
"MIT"
] | permissive | INSERT INTO employees(first_name, last_name, role_id, manager_id) VALUES
("George", "Shustermann", 1, 2),
("Amanda", "Allbright", 2, 3),
("George", "Lucas", 3, NULL);
INSERT INTO employee_roles(title,salary,department_id) VALUES
("Set Engineer", 50,1),
("CFO", 100,2),
("Director", 200,3);
INSERT INTO departments(tit... | true |
44b5049dc52d1a313708c6da01384577d91eef0d | SQL | armannurhidayat/aplikasi-penjualan | /Database/anh.sql | UTF-8 | 5,948 | 3.171875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 28, 2019 at 03:19 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
45a18373340fb2a1b3815080628c024a94e64888 | SQL | halltristanj/hackerrank-solutions | /practice/sql/basic-select/weather_observation_station_5.sql | UTF-8 | 191 | 3.046875 | 3 | [] | no_license | -- Minimum
select city, length(city)
from station
order by length(city) asc, city asc
limit 1;
-- Maximum
select city, length(city)
from station
order by length(city) desc, city asc
limit 1;
| true |
07340d133b8e17aed76f9a72d26ea0eff06d0dff | SQL | erick-tavares/cadastro_escola | /src/main/resources/db/migration/V20200217004807__add_boletimId_tabela_nota.sql | UTF-8 | 138 | 2.703125 | 3 | [] | no_license | alter table nota
add boletim_id BIGINT;
alter table nota
add constraint fk_nota_boletim foreign key (boletim_id) references boletim(id); | true |
d418458e5b65940cd580e24ba9baa911bbd3bf20 | SQL | Manuelfrsz/Proyecto_trimestre_3 | /insert proyecto.sql | UTF-8 | 4,188 | 3.03125 | 3 | [] | no_license | use asistente_financiero;
insert into `usuarios` (`idUsuarios`, `usuEstado`, `usuTipoDocumento`, `usuDocumento`, `usuNombres`, `usuApellidos`, `usuFechaNacimiento`, `usuEdad`, `usuEstrato`)
values
(1, 1, 'cc', '1032500387', 'Manuel Fernando', 'Romero Suarez', '1998-06-29', 23, 2),
(2, 1, 'cc', '1022989588', 'Luis Edua... | true |
5c0c26d78b4241552cad18b9fec0eb0ae10c90f8 | SQL | garyaj/quotes | /bin/stockprices.sql | UTF-8 | 2,203 | 3.53125 | 4 | [] | no_license | # MySQL dump 7.1
#
# Host: localhost Database: stockprices
#--------------------------------------------------------
# Server version 3.22.32
#
# Table structure for table 'indicators'
#
CREATE TABLE indicators (
scode varchar(10) DEFAULT '' NOT NULL,
iname varchar(10) DEFAULT '' NOT NULL,
date date DEFAULT '... | true |
5e1514bc4a85a303f3c42dacb5aa07b09a174efb | SQL | VincentSureau/exercices-php | /exercices/sql/musicdq.sql | UTF-8 | 8,174 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mer 30 Mai 2018 à 19:02
-- Version du serveur : 10.0.34-MariaDB-0ubuntu0.16.04.1
-- Version de PHP : 7.0.30-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... | true |
ac317a898ff53099b5e969d947aa3286b217138c | SQL | devOperator/devOperator.github.io | /m2-w5d5-constraints-and-transactions-exercises/constraints-and-transactions-exercises.sql | UTF-8 | 5,274 | 3.78125 | 4 | [] | no_license | -- Write queries to return the following:
-- The following changes are applied to the "pagila" database.**
-- 1. Add actors, Hampton Avenue, and Lisa Byway to the actor table.
INSERT INTO actor
(actor_id, first_name, last_name)
VALUES
((SELECT MAX(actor_id) FROM actor) + 1, 'HAMPTON', 'AVENUE')
INSERT INTO actor
(ac... | true |
796f9b0f56ecbb37003d1f98cce7ab5c06aa858e | SQL | jongeunk0613/GladiLog | /server/application/db/procedures/SP_RTN_USER_WITH_EMAIL.sql | UTF-8 | 155 | 2.953125 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE GetUserWithEmail(IN IN_EMAIL VARCHAR(100))
BEGIN
SELECT *
FROM TB_USER
WHERE EMAIL=IN_EMAIL;
END $$
DELIMITER ; | true |
f6465a33abbf21c953f5190ef6b32920ed002ad6 | SQL | tvelykyy/indexator | /src/main/resources/schema.sql | UTF-8 | 930 | 3.71875 | 4 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for page
-- ----------------------------
DROP TABLE IF EXISTS `page`;
CREATE TABLE `page` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(250) NOT NULL,
`title` varchar(300) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY ... | true |
f3db57fa854ae45e34fdcfa074028a613a8ddd02 | SQL | minjay/LeetCode | /185. Department Top Three Salaries/my_code.sql | UTF-8 | 391 | 4.15625 | 4 | [] | no_license | # Write your MySQL query statement below
select DName, EName, Salary
from (
select D.Name as DName, E.Name as EName, E.Salary, (
select count(distinct E2.Salary)
from Employee E2 join Department D2 on
E2.DepartmentId=D2.Id
where E.Salary<=E2.Salary and D.Id=D2.Id) as RANK
from Em... | true |
e66c7726be51ac22ed73fdc14012f88f360f7e1b | SQL | grdesai20/Multi-Touch-Attribution-Model | /2. Data Cleaning/Bigquery Scripts/.ipynb_checkpoints/3. Aggregate_User_Sessions-checkpoint.sql | UTF-8 | 1,742 | 4 | 4 | [] | no_license | #User level agg 0
'''
Once we have created unique sessions, we identified multiple interactions of every user in every session.
In Aggregation, we have aggregated the interactions each user had within each session. This could also be thought of as removing duplicates. (group by)
In the following code, we now have ... | true |
f15659065a76d3f7a62fbc04501ef02d2c93e032 | SQL | zverinec/interlos-web | /resources/db/tables.sql | UTF-8 | 8,029 | 3.578125 | 4 | [] | no_license | SET NAMES utf8;
SET foreign_key_checks = 0;
DROP TABLE IF EXISTS `answer`;
CREATE TABLE `answer` (
`id_answer` int(25) unsigned NOT NULL AUTO_INCREMENT COMMENT 'identifikator',
`id_team` int(25) unsigned NOT NULL COMMENT 'tym, ktery hada kod',
`id_task` int(25) unsigned NOT NULL COMMENT 'ukol, jehoz kod se hada',
... | true |
7f4391d0d3b4f70a98f08bb36cbbf45d1a21b698 | SQL | BOC1096/Module2_C0919G1_DoanNgocLinh | /src/CaseStudy_DataBase/Database_Furama.sql | UTF-8 | 17,025 | 3.390625 | 3 | [] | no_license | drop database if exists caseStudyDataBase;
create database caseStudyDataBase;
use caseStudyDataBase;
create table Vitri(
IDVitri int unique auto_increment not null primary key,
TenViTri nvarchar(45) not null
);
create table TrinhDo(
IDTrinhDo int unique auto_increment not null primary key,
TrinhDo nvarchar(45) not null... | true |
654a318da550b29644775a59ace4a31f4dc3be5d | SQL | Thetu99/watch_store | /watch_store.sql | UTF-8 | 11,673 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th7 13, 2020 lúc 08:47 AM
-- Phiên bản máy phục vụ: 10.3.16-MariaDB
-- Phiên bản PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
558a27ef0657cfd4cc7c09a157003c97cb7ca117 | SQL | sfermion/NodeWatch | /Airflow/dags/resources/stages/verify/sqls/traces_blocks_count.sql | UTF-8 | 377 | 3.421875 | 3 | [] | no_license | SELECT IF(
(SELECT COUNT(DISTINCT(block_number)) FROM `{{DESTINATION_DATASET_PROJECT_ID}}.{{DATASET_NAME}}.traces`
WHERE trace_type = 'reward' AND reward_type = 'block') =
(SELECT COUNT(*) FROM `{{DESTINATION_DATASET_PROJECT_ID}}.{{DATASET_NAME}}.blocks`) - 1, 1,
CAST((SELECT 'Total number of unique blocks in traces is... | true |
e9548695ac672fa4d692535bbadac5e312b9e1de | SQL | atom-chen/server | /config/sql/v0_4/game_giftcode.sql | UTF-8 | 288 | 2.671875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS game_giftcode(
`name` VARCHAR(12) COMMENT '角色名',
`keyCode` VARCHAR(12) COMMENT '礼包码',
`groupId` VARCHAR(12) COMMENT '礼包码组',
PRIMARY KEY(`name`,keyCode,groupId)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
| true |
57d8d1e2c1a4d3e13fafda967faf2ed0ca057b28 | SQL | JTM152769/DataScience-With-Python_Track | /23-joining-data-in-postgresql/7-Inner-Challenge.sql | UTF-8 | 1,756 | 4.28125 | 4 | [] | no_license | ''
Inner challenge
The table you created with the added geosize_group field has been loaded for you here with the name countries_plus. Observe the use of (and the placement of) the INTO command to create this countries_plus table:
SELECT name, continent, code, surface_area,
CASE WHEN surface_area > 2000000
... | true |
b1aadcf99b6d0541d9f4ae4a8cf01ffada0ee7a4 | SQL | eteresh/metric_constructor | /sql/actions.sql | UTF-8 | 345 | 3.046875 | 3 | [] | no_license | INSERT OVERWRITE TABLE hack_ab.actions PARTITION(year=':YEAR', month=':MONTH', day=':DAY')
SELECT platform, dt, uid, 'search' AS action
FROM hack_ab.searches
WHERE (year=':YEAR' AND month=':MONTH' AND day=':DAY')
UNION
SELECT platform, dt, uid, 'response' AS action
FROM hack_ab.responses
WHERE (year=':YEAR' AND month='... | true |
9cdbe03f9b2e8683571d691d1339e2ba9faa5736 | SQL | Gasan66/sqlScript | /MatchADandASUZD_3.sql | UTF-8 | 777 | 3.140625 | 3 | [] | no_license | use ASUZD;
begin tran changeEmails
update AspNetUsers
set Email = comp.Email_AD, UserName = comp.Email_AD
from AspNetUsers usr
join _compare_ASUZD_and_AD comp on usr.Id = comp.UsrAsuzdID
where comp.Email_AD not in (select distinct usr1.UserName from AspNetUsers usr1)
and usr.IsEnabled = 1
... | true |
a326538140af033b2750c507ea12cc2a1f23d597 | SQL | PabloGonzalezGonzalez/adbd2021 | /ProyectoFinal/Documentos/carga_datos.sql | UTF-8 | 6,032 | 2.71875 | 3 | [] | no_license | -- -----------------------------------------------------
-- Data for table `mydb`.`PAIS`
-- -----------------------------------------------------
START TRANSACTION;
USE `mydb`;
INSERT INTO `mydb`.`PAIS` (`NombrePais`, `PosicionRankingPaises`, `NClubs`, `NJugadores`, `NCompeticiones`) VALUES ('España', 1, 0, 0, 0);... | true |
2d821afe4fec7cff25ea9b5d4c778ddb401ca405 | SQL | carreyest/CargaSegOperativo | /consultas.sql | UTF-8 | 1,461 | 2.765625 | 3 | [] | no_license | select COUNT(*) from l_calificacion_incidentes_AUT_SAT
select COUNT(*) from l_calificacion_rs_AUT_SAT
select COUNT(*) from l_detalle_eficiencia_presupuestal_SAT
select COUNT(*) from l_detalle_medicion_apertura_SAT
select COUNT(*) from l_detalle_medicion_cierre_SAT
select COUNT(*) from l_detalle_medic... | true |
d403964773446b5a154e12232dab8a19cc24227b | SQL | jessekremer/hockey-schedule-helper | /3 - schedule_helper.sql | UTF-8 | 3,947 | 4.46875 | 4 | [] | no_license | -- tired view
create or replace view tired as
with team_games as
(select distinct
sub.*
from
(select
str_to_date(ts.Date,'%d/%m/%Y') as game_date,
Home as team
from
team_schedule ts
union all
select
str_to_date(ts.Date,'%d/%m/%Y') as game_date,
Visiting as team
from
team_schedule ts) sub)
sele... | true |
342d6d720df646a91dbf8bff89828af8bd4fdff3 | SQL | kbreczko/database | /Listy/lista4/zad2.sql | UTF-8 | 952 | 4.25 | 4 | [] | no_license | -- Napisz funkcję plan_zajec_prac(int,int) - pierwszy argument
-- to kod pracownika, a drugi, to kod semestru. Funkcja ma
-- zwracać wszystkie zajęcia danego pracownika w danym
-- semestrze wraz z nazwą przedmiotu, rodzajem zajęć, terminem,
-- salą i liczbą osób zapisanych na zajęcia. Zobacz plan zajęć
-- użytkownika 1... | true |
7563179a18249caae5eb50017c283712f7319014 | SQL | jankney2/pitchvivid | /db/userCtrl/getAllVideos.sql | UTF-8 | 252 | 3.234375 | 3 | [] | no_license |
select jobs.id, jobs.job_title, to_char(jobs.opening_date, 'mm/dd/yyyy') as opening_date, companies.name
from job_users
join jobs on jobs.id = job_users.job_id
join companies on companies.id = jobs.company_id
where job_users.user_id = ${user_id};
| true |
ff447112bf702274e68933581da72609a9a3ddf8 | SQL | c0420g1/c04piggy_api | /src/main/resources/db/migration/V1.4__hai_update_cote_employee.sql | UTF-8 | 2,179 | 2.578125 | 3 | [] | no_license |
-- update cote--
UPDATE `c04piggy`.`cote` SET `export_date` = null, `import_date` = '2020-09-05' WHERE (`id` = '2');
UPDATE `c04piggy`.`cote` SET `export_date` = null, `import_date` = '2020-09-15' WHERE (`id` = '3');
UPDATE `c04piggy`.`cote` SET `export_date` = null, `import_date` = '2020-09-25' WHERE (`id` = '4');
U... | true |
412da8042c931e46908c6e6187c704906c6e2647 | SQL | queirozsc/Automation-Scripts | /SQL/Smart/Requestia - Azure.sql | UTF-8 | 1,338 | 3.125 | 3 | [] | no_license |
SELECT top 10 request as Chamado
, abertura as DT_Abertura
, resolucao as DT_Resolucao
, client as Solicitante
, curranal as Analista
, orgunit as Unidade_Origem
, unidade_atendimento as Unidade_Atendimento
, product as Produto
, process as Processo
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.