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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ab6813e1675859ecbd4f9c2ab72cdba506502885 | SQL | JiaqiWang1996/INFO6210Database | /INFO6210/quiz/Midterm/Midterm Solution/Quiz 1 Last Digit 1, 8 SQL Solutions.sql | UTF-8 | 825 | 4.28125 | 4 | [] | no_license |
-- Quiz 1 Last Digit 1, 8 SQL Solutions
-- Q3
Select SalesPersonID, year(OrderDate) as Year,
count(SalesOrderId) as 'Total Orders'
From Sales.SalesOrderHeader
where SalesPersonID in
(select SalesPersonID
From Sales.SalesOrderHeader
Group By SalesPersonID
having count(distinct year(OrderDate)) >= 3)
Group B... | true |
10e5e254a81c351ad8386b08821e24f4de229c45 | SQL | Guigoleto/CSC210-Database_Fundamentals | /Queries/AP - 37/SQLQuery5 - INNER JOIN, CORRELATION NAMES - 5 Queries.sql | UTF-8 | 3,071 | 4.65625 | 5 | [] | no_license | use Ap;
select InvoiceID,
VendorContactFName+' '+VendorContactLName as 'VendorName',
VendorAddress1,
VendorCity,
VendorName as 'Company Name',
VendorState
from Invoices
join Vendors
on Invoices.VendorID=Vendors.VendorID
order by InvoiceID;
-- This query is asking the VendorID from the invoic... | true |
759ef6370cdcc2516c638a9dcb0f6fc14a5660c7 | SQL | Raoul-Vilain/web_dynamique | /ProjetPiscine/Dump20210528/siteweb_notification.sql | UTF-8 | 2,247 | 2.984375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.25, for macos11 (x86_64)
--
-- Host: localhost Database: siteweb
-- ------------------------------------------------------
-- Server version 5.7.32
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
7d19fa9f33ef246a7cafa2b65557baec5b712706 | SQL | CUBRID/cubrid-testcases | /sql/_01_object/_09_partition/_004_manipulation/cases/1149.sql | UTF-8 | 1,633 | 3.515625 | 4 | [
"BSD-3-Clause"
] | permissive | --test delete(int): deleting all data in a list partition(has no NULL) using a delete statement with all of the partition key values
create table list_test(id int not null,
test_int int,
test_smallint smallint,
test_numeric numeric(38,10),
test_float float,
test_real real,
test_double double,
... | true |
7547307774daaac1011f645c46610603a52e11e1 | SQL | tatsuhirochiba/tpch-on-spark | /hive/scripts/createTable10g.sql | UTF-8 | 14,397 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | -- create database
create database if not exists tpch10g;
create database if not exists tpch10g_parquet;
-- various settings for Hive and MR
-- for snappy compression codec
SET hive.exec.compress.intermediate=true;
SET hive.exec.compress.output=true;
SET mapred.map.output.compression.codec=org.apache.hadoop.io.compres... | true |
7810da4ba6e4f825435424b045050b6c1c6b9c11 | SQL | abranch307/BionicBallerina | /Database_Scripts/MCU_PINS.sql | UTF-8 | 541 | 3.546875 | 4 | [] | no_license | CREATE TABLE `mcu_pins` (
`PIN_SETUP` BIGINT(20) NOT NULL AUTO_INCREMENT,
`DESCRIPTION` VARCHAR(50) NULL DEFAULT NULL,
`MCU_NAME` VARCHAR(50) NOT NULL,
`DATA_PIN` TINYINT(4) NOT NULL,
`CLOCK_PIN` TINYINT(4) NOT NULL,
PRIMARY KEY (`PIN_SETUP`),
INDEX `FK_mcu_pins_mcu` (`MCU_NAME`),
CONSTRAINT `FK_mcu_pins_mcu` F... | true |
f7e342c896338197d7f6de93eb8f75fddffe037b | SQL | alfinsyahsuhendra/SQL-Study-Progate | /sql_study_3/page7/exercise2.sql | UTF-8 | 122 | 3.265625 | 3 | [] | no_license | SELECT countries.name, SUM(goals)
FROM players
JOIN countries
ON players.country_id=countries.id
GROUP BY countries.name;
| true |
955e9fafb6fd1bbfabc47cf29e2a6dbe046e1a42 | SQL | MohammedElagha/database_course | /Lectures/04 - DML - Introduction/04_select.sql | UTF-8 | 274 | 3.5 | 4 | [] | no_license | /* select id and c_no of all courses */
SELECT id, c_no FROM courses;
/* select id and c_no of courses which credit > 2 */
SELECT id, c_no FROM courses
WHERE credit > 2;
/* select all columns of courses which credit not equals 2 */
SELECT * FROM courses
WHERE credit != 2; | true |
8514050eede3d6342b8a3c612e9483c0b0571e35 | SQL | mariodan/form-upload-portlet | /docroot/WEB-INF/sql/formular-upload.sql | UTF-8 | 514 | 2.8125 | 3 | [] | no_license |
use cjarges_portlets;
DROP TABLE IF EXISTS `cjarges_portlets`.`formular_upload_portlet`;
CREATE TABLE `cjarges_portlets`.`formular_upload_portlet` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nume` varchar(45) NOT NULL,
`prenume` varchar(45) NOT NULL,
`telefon` varchar(45) NOT NULL,
`email` varchar(60... | true |
58b00b1e0ef63a93a7a645f49d2e2b352f51b715 | SQL | oscar522/AcueductosVeredales | /DB FINAL 14 03 2016.sql | UTF-8 | 89,619 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 15-03-2016 a las 00:43:15
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
c1f1ba9b82ea82f4b3e644040d2f5072f69cdfdd | SQL | cs12110/4fun | /docs/4fun_db.sql | UTF-8 | 4,639 | 3.328125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 47.98.104.252
Source Server Version : 50718
Source Host : 47.98.104.252:3306
Source Database : 4fun_db
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2019-08-01 23:40:53
*/
SET FOREIGN_KEY_CHECKS=... | true |
3d022c466a8e1e240bfda2074902fc5f5b54970b | SQL | ahundiak/zayso2010 | /osso2012x/apps/s5games/count.sql | UTF-8 | 2,756 | 3.40625 | 3 | [] | no_license | select count(*) from event_person left join event on event.id = event_person.event_id where event.project_id = 62;
select count(*) from event_person left join event on event.id = event_person.event_id where event.project_id = 62 and event_person.person_id IS NOT NULL;
select count(distinct event_person.person_id)... | true |
bfcbefae27410445216ee9d9560efdb866e2f45d | SQL | radtek/scripts-oracle-named | /+usados/Novos/Query Optimization/index_access_paths.sql | UTF-8 | 3,149 | 3.890625 | 4 | [
"MIT"
] | permissive | --------------------------------------------------------------------------------
--
-- Script: index_access_paths.sql
-- Purpose: *** called from table_access_paths.sql ***
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: Steve Adams
--
------------------------------------------------------------------------------... | true |
0127b657abda255f7fedd1d3a0cf1943e0a42d25 | SQL | ChaitanyaCodes/esports_blog | /db-export/categories.sql | UTF-8 | 1,605 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3307
-- Generation Time: Dec 01, 2020 at 09:36 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... | true |
53a6b18a343382849b73627aa84f40db4ff7b95d | SQL | Palacio120/Mgpes | /Base de datos/mgps_produccion_capitulodelibro.sql | UTF-8 | 5,816 | 2.84375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: mgps
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... | true |
7fe892c2dd2640638da1d2f613c022d4ae5d705d | SQL | sengeiou/Wechat-Applet-Shop | /src/main/resources/db/migration/V1__create_USER_table.sql | UTF-8 | 221 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | create table tb_user(
id int primary key auto_increment,
name varchar(20),
tel varchar(20) unique,
avatar_url varchar(100),
created_at timestamp default current_timestamp,
modified_at timestamp default current_timestamp
) | true |
a34b0c783b85717ce19806bcd54e755b0ed722b7 | SQL | yefc/CBOE | /subprojects/Classic/cs_security/config/Oracle_Install_Scripts/create_blank_cs_security_DB/sql/CreateTempTablespace_8.sql | UTF-8 | 313 | 2.671875 | 3 | [] | no_license |
-- Oracle 8i Temp Tablespace syntax
CREATE TABLESPACE &&tempTableSpaceName
NOLOGGING
DATAFILE '&&tempTableSpaceFile' SIZE &&tempTablespaceSize REUSE
AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT STORAGE ( INITIAL 1M NEXT 1M MINEXTENTS 1 MAXEXTENTS
UNLIMITED PCTINCREASE 0 )TEMPORARY
ONLINE;
| true |
163aab5cba6ad97d52138f0904f509f01385da6e | SQL | esember/MYSQL-AND-NODE.JS | /logicel_ops.sql | UTF-8 | 4,020 | 3.546875 | 4 | [] | no_license | select database();
show DATABASES;
use cat_app_4;
SELECT * from books1;
select title, released_year from books1 where released_year = 2017;
select title, released_year from books1 where released_year =2013;
select title, released_year from books1 WHERE released_year != 2017;
select title, author_lname from books1 wh... | true |
24335ac5f944ae5f19112afaf235a74b0a433a15 | SQL | Allin-GDD/FrbaCommerce | /Procedures/historialCompras.sql | UTF-8 | 329 | 3.484375 | 3 | [] | no_license | create PROCEDURE historialCompras
@Id nvarchar(30)
AS
BEGIN
SELECT C.Fecha, P.Descripcion, C.Cantidad, U.Usuario AS 'Vendedor'
FROM Publicacion P
JOIN Compra C ON
P.Codigo = C.Codigo_Pub
JOIN Usuario U ON
P.Usuario = U.Id_Usuario
WHERE C.Id_Cliente = @Id
order by C.Fecha
... | true |
721d631eac22083b3204e713e2c3257a664fcc69 | SQL | IVSEZ/mysqlbis | /RCB/create table RCB_IPUSAGEOLD.sql | UTF-8 | 774 | 2.78125 | 3 | [] | no_license | use rcbill;
drop table if exists rcb_ipusageold;
CREATE TABLE `rcb_ipusageold` (
`USAGEID` int(11) DEFAULT NULL ,
`DEVICEID` int(11) DEFAULT NULL ,
`USAGEDATE` datetime DEFAULT NULL ,
`TRAFFICTYPE` int(11) DEFAULT NULL ,
`CLIENTIP` bigint(25) DEFAULT NULL ,
`USAGEDIRECTION` varchar(255) DEFAULT NULL ,
`ZONEID` int(1... | true |
ead8ee8e1c77f72183fc874fa60b91ac92691195 | SQL | zbrsnd/gitrepo | /klasa 2/magazyn/magazyn.sql | UTF-8 | 939 | 3.59375 | 4 | [] | no_license | DROP TABLE IF EXISTS customers;
DROP TABLE IF EXISTS subscriptions;
DROP TABLE IF EXISTS tbOrders;
CREATE TABLE customers
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
customer_name TEXT,
address TEXT
);
CREATE TABLE subscriptions
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
description TEXT,
price_per_month DECIMAL... | true |
9f33b5c8a46be292a7e37d61678488700be5eab2 | SQL | LNabas/WebProject | /Code/plugin/tuto.sql | UTF-8 | 3,468 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 24 Février 2014 à 21:36
-- Version du serveur: 5.6.12-log
-- Version de PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
3350c50370f66c11cd39d7dde548f8d88dea20eb | SQL | tanyushechka/php2project | /tagedo_php2proj.sql | UTF-8 | 16,763 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Янв 06 2016 г., 14:42
-- Версия сервера: 5.5.36-34.0-632.precise
-- Версия PHP: 5.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
f043ed4e6d3bb4a8c1e9e4d1873104b8ce094530 | SQL | genuineaffairs/TableCharm_PHP | /temporary/package/packages/module-grandopening-4.5/module-grandopening-4.5.0/application/modules/Grandopening/settings/my-upgrade-4.3.0p2-4.5.0.sql | UTF-8 | 414 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `engine4_grandopening_covers` (
`cover_id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`start_date` timestamp NULL DEFAULT NULL,
`end_date` timestamp NULL DEFAULT NULL,
`enabled` tinyint(1) DEFAULT '1',
PRIMARY KEY (`cover_id`),
UNIQUE KEY `title_UN... | true |
710b5dbc551a1c6f8a5987994a58f88d30647215 | SQL | qinchaofeng/vertica | /salt/vertica_admin/opt/yp/pdsdw/vertica_admin/sql/running_config_params_backup.sql | UTF-8 | 521 | 2.546875 | 3 | [] | no_license | ------------------------------------------------------------
-- Set backed up running configuration parameters
------------------------------------------------------------
SELECT '-- Set backed up running configuration parameters';
-- SELECT 'SELECT set_configuration_parameter(''' || parameter_name || ''',''' || curren... | true |
d27f7ff0c446a459a4e30bb09e53d4b406ac89e4 | SQL | longstl/event-console-simple | /SQL/events.sql | UTF-8 | 1,454 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th4 03, 2018 lúc 09:44 AM
-- Phiên bản máy phục vụ: 10.1.30-MariaDB
-- Phiên bản PHP: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
55e7984306b50aaeabbc6db408dc1b8effa4bbfa | SQL | thesven/Question-Board | /questions.sql | UTF-8 | 760 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!4010... | true |
e1ac859ec67f1466441fd64a745742f4fbb951d6 | SQL | Nswastika/College_Assignments_PHP_and_Laravel | /Working_Employee_Payroll_Management_System (Assignment Task)/database.sql | UTF-8 | 10,998 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 7.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 18, 2020 at 04:43 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
f152ded9121d00e5937213dcf1b5e80bef4df160 | SQL | UcgajjarPDI/Nicepak-PIMS | /PDI_SALESTRACING_DEV/TRC/Stored Procedures/spTRC_GET_ERR_UPI.sql | UTF-8 | 548 | 3.46875 | 3 | [] | no_license | CREATE PROCEDURE [TRC].[spTRC_GET_ERR_UPI]
@vSales_Period varchar(10), @vDIST_ID varchar(20) = null
WITH EXEC AS CALLER
AS
BEGIN
SELECT DISTINCT DIST_ID, DIST_NR, SALES_PERIOD, TRC_PROD_ID as PROD_ID
, L.LKUP_CD_DES as Err_Desc
FROM [PDI_SALESTRACING_DEV].[STAGE].[SALES_TRACING_CURR] S
JOIN PDI_SALESTRACING_DEV.REF.L... | true |
b89dd80384ddbd6d1bcac97541a5693c3db1d5bc | SQL | kasyanov23/znamenka | /reporting/src/main/resources/sql/client_payments.sql | UTF-8 | 808 | 4.09375 | 4 | [] | no_license | WITH payments AS (SELECT
coalesce(sum(pay.payment_amount), 0) AS sum_payments,
pur.client_id,
pur.trainer_id,
pur.product_id,
pur.discount_id
FROM
znamenka.purchase pur LEFT JOIN zna... | true |
78579870fb5664c7fee56aa6086aa83dd2a36c44 | SQL | paulyhong2000/assignment4_3309_petshop | /sql/Task2_Making_Tables.sql | UTF-8 | 1,870 | 3.71875 | 4 | [] | no_license | create database pets3309;
use pets3309;
create table stores (
storeID int not null auto_increment,
phoneNumber varchar(15) not null,
email varchar(60) not null,
primary key(storeID));
create table employee (
EID int not null auto_increment,
Ename varchar(50) not null,
phoneNumber varchar(15) not null,
email varc... | true |
ac3ccbf3f01a271c0df6758baba0d5c59f17033f | SQL | rafatbd/estudiant-mysql-server | /base-dades.sql | UTF-8 | 5,817 | 3.15625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.32, for Linux (x86_64)
--
-- Host: localhost Database: estudiant_mysql
-- ------------------------------------------------------
-- Server version 5.7.32-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... | true |
f03c76873932f1d115db1e1556c8385d6744a40b | SQL | kingcoconut/slypAPI | /sql/expose_new_messages_count.sql | UTF-8 | 271 | 3.5625 | 4 | [] | no_license | use slyp_alpha;
select count(scm.id)
from slyp_chats sc
join slyp_chat_users scu
on (sc.id = scu.slyp_chat_id)
join slyp_chat_messages scm
on (scm.slyp_chat_id = sc.id)
where scu.user_id = 2 and sc.slyp_id = 1 and scm.user_id <> 2 and scm.created_at > scu.last_read_at;
| true |
75288a3bd2c1f9c2f3c40ed18428596c9ea5939a | SQL | vvanherk/query_requests | /renewal_example_from_somewhere.sql | UTF-8 | 884 | 3.34375 | 3 | [] | no_license | select
pp.policynumber,
j.jobnumber,
ppst.typecode as status,
p.productcode,
PP.MULTIPOLICYINTERFACESUCCESS_CG,
j2.jobnumber,
cb.creditband_cg,
cb.creditscorecalled_cg as pp1creditbandcalled,
cb2.creditband_cg as pp2creditband,
cb2.creditscorecalled_cg as pp2creditbandcalled
from pcuser.pc_policyperiod pp
... | true |
e095b880ce198d3e1419d226f9994bcd7722175d | SQL | idempierelbr/idempierelbr | /org.idempierelbr.core/migration/i2.0/oracle/201603311327-Sped-055-LBR_FactFiscal_InvoiceTax.sql | UTF-8 | 458 | 2.984375 | 3 | [] | no_license | -- Sped EFD
-- This script was generated for a postgresql DB. It should be tested in a oracle DB.
CREATE OR REPLACE VIEW LBR_FactFiscal_InvoiceTax AS
SELECT it.c_invoice_id,
t.name LBR_Tax_Name,
it.taxamt,
it.taxbaseamt
FROM c_invoicetax it
JOIN c_tax t ON it.c_tax_id = t.c_tax_id
WHERE it.isactiv... | true |
398b7cf7b0cf64af47d8725b3538c5dd3c756df1 | SQL | Ardaghor/BBDD | /func_agreg_data.sql | UTF-8 | 288 | 3.21875 | 3 | [] | no_license | SELECT COUNT (*) FROM property4rent WHERE rent > 350;
SELECT COUNT (DISTINCT property_id) FROM viewing WHERE viewdate BETWEEN '1-apr-04' AND '31-may-04';
SELECT COUNT (position), SUM(salary) FROM staff WHERE position = 'manager';
SELECT MIN(salary),MAX(salary),AVG(salary) FROM staff; | true |
1c3cdd51a33677a65b1f47af8fb1af76031802c7 | SQL | Peyton-Cysewski/Political-Hierarchy-Generator | /data/schema.sql | UTF-8 | 1,416 | 3.359375 | 3 | [
"MIT"
] | permissive | -- Creates a table for unique users
DROP TABLE IF EXISTS users;
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
user_name VARCHAR(255),
user_password VARCHAR(255)
);
-- Creates a table for specific data for the tiers themselves
DROP TABLE IF EXISTS politics;
CREATE TABLE IF NOT EXISTS politics (
id... | true |
298231bf60629fb959290ef99744b8f4179231a7 | SQL | sagademo/Database | /ITI/ITI/mst/Stored Procedures/sp_u_Updatemasterdesignation.sql | UTF-8 | 1,195 | 3.75 | 4 | [] | no_license | CREATE procedure [mst].[sp_u_Updatemasterdesignation]
@AdminId int,@Designation nvarchar(100),@DesignationId tinyint
as
begin
if exists(select DesignationId from mst.Master_Designation where DesignationId=@DesignationId)
begin
if exists(select DesignationId from mst.Master_Designation where Designation=@Designation... | true |
4dbf91caed8dcd7d1d0d57b728cf5958843ae678 | SQL | gpalmarante/SA4-G7-gerenciamento-de-compra | /SA4/target/classes/com/mycompany/sa4/Banco/dbestoque.sql | UTF-8 | 2,289 | 3.03125 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Mon Aug 9 23:46:00 2021
-- 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_M... | true |
71c30c06e3bbb875ea68dad45e346de6c76b7cfb | SQL | sammyjava/neptune | /jcms/sql/2008012301.sql | UTF-8 | 1,481 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | --
-- quaternary navigation settings and stylesheet classes
--
UPDATE appinfo SET appinfo_value='2008012301' WHERE appinfo_name='db_version';
INSERT INTO settings VALUES (330, 'navquat_disable', 'true', 'Disable quaternary navigation: true/false.');
UPDATE stylesheetcategories SET num=13 where stylesheetcategory_id... | true |
1f442b1db965b7399b87c7bb35708c586f037108 | SQL | BlagoKolev/SoftUni | /MS SQL/CRUD Operations/SoftUniCRUD.sql | UTF-8 | 1,697 | 3.953125 | 4 | [
"MIT"
] | permissive |
SELECT * FROM [Departments];
SELECT [Name] from [Departments];
SELECT [FirstName], [LastName], [Salary] FROM [Employees];
SELECT [FirstName],[MiddleName], [LastName] FROM [Employees];
SELECT CONCAT([FirstName],'.',[LastName],'@','softuni.bg') AS 'Full Email Address' FROM [Employees];
SELECT DISTINCT [Salary] FROM... | true |
bd2447b81ff9a51e667e58e0cd2584f0e94a7eb2 | SQL | octavany97/Vivlia | /mybookfix.sql | UTF-8 | 2,070 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | INSERT INTO `buku` (`id_buku`, `nama_buku`, `id_penerbit`, `penulis`,'isbn','tahun_terbit','banyak_halaman','modal','keterangan','stok') VALUES
(1,'Buku Besar 1', 1,'Budianto',109291,2100,100,55000,'Bacaan jaman now',100),
(2,'Buku Besar 2', 1,'Andre Lim',109292,2100,243,70000,'Bacaan jaman now',150),
(3,'Buku Besar 3... | true |
d84ed1e8b2de8de08d1f481acecc0720093dea79 | SQL | gustavoecruz/vdg-backend-heroku | /bin/ScriptMySQL/BD VDG.sql | UTF-8 | 894 | 3.375 | 3 | [] | no_license | CREATE DATABASE vdg;
USE vdg;
DROP TABLE IF EXISTS usuario;
DROP TABLE IF EXISTS rol;
DROP TABLE IF EXISTS persona;
CREATE TABLE rol (
id_rol INT(1) AUTO_INCREMENT,
nombre VARCHAR(50),
PRIMARY KEY (id_rol)
);
CREATE TABLE usuario (
id_usuario INT AUTO_INCREMENT,
email VARCHAR(50),
contrasena VARCHAR (50),
... | true |
6052a1804337c09b4e54df3173dd059d03cd116b | SQL | polavarapup2/CTRP_4x_PA | /pa/dbscripts/db-upgrade/postgresql/4.2/PO-8112-2.sql | UTF-8 | 270 | 3.15625 | 3 | [] | no_license | CREATE UNIQUE INDEX unqiue_study_subject_idx ON study_subject (study_site_identifier, status_code, upper(assigned_identifier))
WHERE status_code='ACTIVE' AND assigned_identifier IS NOT NULL
AND study_site_identifier IS NOT NULL AND trim(assigned_identifier)<>''; | true |
1eb6507da0a26b140ee99cb0b58872c8832cbdfe | SQL | johnventions/BrokerVision | /brokervision.sql | UTF-8 | 7,069 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Aug 28, 2016 at 01:25 AM
-- Server version: 5.5.49-log
-- PHP Version: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
ed8c361597333b2be389895499e0b96566f92572 | SQL | AbiNash14/Spring-Boot-Registration-page-and-View-Page | /Chilika.sql | UTF-8 | 3,266 | 3.140625 | 3 | [] | no_license | /*
SQLyog Community v13.1.6 (64 bit)
MySQL - 8.0.21 : Database - tourism
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECK... | true |
b628e0a96ea97f256327d60647562f6d4a8161c0 | SQL | kvn-km/BootcampX | /4_queries/3_assistance_request_data.sql | UTF-8 | 337 | 3.484375 | 3 | [] | no_license | SELECT
teachers.name AS "teacher",
students.name AS "student",
assignments.name AS "assignment",
(completed_at - started_at) AS "duration"
FROM assistance_requests
JOIN teachers ON teacher_id = teachers.id
JOIN students ON student_id = students.id
JOIN assignments ON assignment_id = assignments.id
ORD... | true |
354a59fb7972baa1cf227c6f5f04b8df3078de89 | SQL | wwjiang007/yugabyte-db | /managed/src/main/resources/db/migration/default_/common/V165__Add_Time_Unit.sql | UTF-8 | 790 | 3.171875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"OpenSSL"
] | permissive | -- Copyright (c) YugaByte, Inc.
ALTER TABLE backup ADD COLUMN IF NOT EXISTS expiry_time_unit varchar(50);
UPDATE backup SET expiry_time_unit = 'Days' WHERE expiry IS NOT NULL;
ALTER TABLE backup DROP CONSTRAINT IF EXISTS ck_expiry_time_unit;
ALTER TABLE backup ADD CONSTRAINT ck_expiry_time_unit CHECK (expiry_time_uni... | true |
907bdbac3d33101dc3c76c37bd3035e86ff10b4e | SQL | elenaslavutina/gb_mysql_course | /lesson7/lesson7_task3.sql | UTF-8 | 959 | 3.671875 | 4 | [] | no_license |
DROP DATABASE IF EXISTS testDB7_3;
CREATE DATABASE testDB7_3 CHARACTER SET utf8;
USE testDB7_3;
DROP TABLE IF EXISTS fligths;
CREATE TABLE fligths (
id SERIAL PRIMARY KEY,
city_from VARCHAR(255),
city_to VARCHAR(255)
) COMMENT = 'Направления';
DROP TABLE IF EXISTS cities;
CREATE TABLE cities (
id SERIAL P... | true |
bf82d9659e37a4de56fe2a75a6547773dc603a05 | SQL | robinsonmhj/codebase15-18 | /JMXMonitor/SQL/initialDDL.sql | UTF-8 | 19,384 | 2.671875 | 3 | [] | no_license | create table sandbox.resourceStatistics(
serverName varchar(100) not null,
getTime timestamp,
usedMemory int,
getsRate numeric(14,1),
putsRate numeric(14,1),
totalRegionEntryCount bigint,
memberUpTime bigint,
totalDiskUsage bigint,
cpuUsage numeric(5,1),
diskReadsRate numeric(14,1),
diskWritesRate... | true |
a318609f50209637d6c8e58a2a5ceca0f29e967a | SQL | Flaviaestat/SQL | /ARQUIVO_3.sql | ISO-8859-1 | 3,358 | 3.75 | 4 | [] | no_license | /*CASE COM GROUP BY */
/*TESTAR*/
SELECT
NUMEROCHECKOUT, SEQUENCIALOPERACAOCHECKOUT,
SUM(VALORNOTAVENDABRUTO) AS VALOR_NOTA
FROM BASE_C
group by NUMEROCHECKOUT, SEQUENCIALOPERACAOCHECKOUT
, CASE WHEN VALOR_NOTA>100 THEN 'A' WHEN VALO_NOTA<=100 THEN 'B' ELSE 'Z' END AS FAIXA
select * from itvet001
se... | true |
ac5aae895ddd61f4d9a27527a54c73d7993fa6c4 | SQL | vanderson-henrique/trybe-exercises | /BACK-END/BLOCO_22/22_3/EXERCÍCIO_BLOCO_22_DIA_03_INDEX.sql | UTF-8 | 1,541 | 4.125 | 4 | [] | no_license | -- Desafios sobre INDEX
/* 1. Verifique o impacto de um FULLTEXT INDEX na tabela category (banco de dados sakila ), adicionando-o na coluna
name . Após ter adicionado o índice, mensure o custo da query utilizando o execution plan, como já foi feito em
lições anteriores. Após ter criado e mensurado o custo da query, ... | true |
39d124294cad42287bd43fe69ca2439a1654a21a | SQL | atstay/bamazon | /BAMAZON.sql | UTF-8 | 1,429 | 3 | 3 | [] | no_license | CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products (
item_id INT (11) auto_increment primary key,
product_name VARCHAR (100),
department_name VARCHAR (100),
price NUMERIC,
stock_quantity NUMERIC
);
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ("Wibbler", "Tools", ... | true |
31eb0946f37c634927ed272b43b8aac97b25c309 | SQL | qinimadeX/LoginTest01 | /LoginTest/.svn/pristine/a2/a29c95ada671f408b6be1cbea27eb285b1397bf4.svn-base | UTF-8 | 1,195 | 2.859375 | 3 | [] | no_license | create table users(
id varchar2(50 char) primary key,
username varchar2(50 char),
password varchar2(50 char),
roles_id varchar2(50 char)
);
create table roles(
id varchar2(50 char) primary key,
name varchar2(50 char)
);
create table permision(
id varchar2(50 char) primary key,
name varchar2(50 ... | true |
78df1d4cc9ea7a722400a837b53f95ffae20bd00 | SQL | luisroel/sunny | /patches/patch_00/spsecurity_delete_user.sql | UTF-8 | 929 | 3.46875 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS `spsecurity_delete_user`;
DELIMITER $$
CREATE PROCEDURE `spsecurity_delete_user`(
IN UserId_p BIGINT
, OUT Msg_p VARCHAR(255)
)
BEGIN
SET Msg_p = '';
IF NOT EXISTS(SELECT * FROM tbsecurity_user WHERE UserId = UserId_p) THEN
SET Msg_p = 'User does not exist. Please verify!';
E... | true |
f0bf7d137c207ac36ec75baf24c6bb7b9b85dc38 | SQL | truonglai111809/database | /bigproject/firework.sql | UTF-8 | 10,758 | 3.453125 | 3 | [] | no_license | -- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... | true |
aee7a946d6e7c95c9b805805b212322917248389 | SQL | jnfgit/Alamano3004 | /Alamano/src/scripts/alta_tabla_pagos.sql | ISO-8859-1 | 1,010 | 3.25 | 3 | [] | no_license | CREATE TABLE PAGOS(
CREATE_DATE DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Fecha de Creacin de la fila',
UPDATE_DATE DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Fecha de modificacin',
UPDATE_USER VARCHAR(200) NOT NULL DEFAULT '' COMMENT 'Usuario que registro el cambio',
ID_PAGO INT UNSIGNED NOT N... | true |
f575c621ce932ecb763bbf5c498d9fd47e928011 | SQL | YoanMoskov/SoftUni-Software-Engineering | /C#-DB/01.DatabaseBasics-MS_SQLServer/04.DataAggregation_Exercise/08.DepositCharge.sql | UTF-8 | 247 | 3.046875 | 3 | [] | no_license | SELECT wizzard.DepositGroup, wizzard.MagicWandCreator,
MIN(wizzard.DepositCharge) AS MinDepositCharge
FROM WizzardDeposits AS wizzard
GROUP BY wizzard.MagicWandCreator, wizzard.DepositGroup
ORDER BY wizzard.MagicWandCreator, wizzard.DepositGroup
| true |
4c96bc47fe8fc72a4ee867a52833c8179b8dcdb2 | SQL | cph-ab270/semester3project-backend | /src/main/resources/apiTestData.sql | UTF-8 | 3,114 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.31, for osx10.6 (i386)
--
-- Host: 127.0.0.1 Database: cba_sem3project
-- ------------------------------------------------------
-- Server version 5.7.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
df873e61fac39f842ea2c1863c85e819fe892744 | SQL | jensen-yan/cs61a_2020_summer | /lab/lab13/lab13.sql | UTF-8 | 1,027 | 4.15625 | 4 | [] | no_license | .read data.sql
CREATE TABLE bluedog AS
SELECT color, pet
FROM students
WHERE color = "blue" and pet = "dog";
CREATE TABLE bluedog_songs AS
SELECT color, pet, song
FROM students
WHERE color = "blue" and pet = "dog";
CREATE TABLE matchmaker AS
SELECT a.pet, a.song, a.color, b.color
FROM students as a... | true |
8b3ec8bcdb20fb352d0cb26cf4dbd4a73b79dc8b | SQL | IamMatty/ProjetoSuperMercado | /SuperMercado/PROJETO 29.05.2019.sql | UTF-8 | 982 | 3.203125 | 3 | [] | no_license | CREATE DATABASE SUPERMERCADO;
CREATE TABLE PRODUTO (
CODIGO_PRO INT AUTO_INCREMENT PRIMARY KEY,
NOME_PRO VARCHAR (60) NOT NULL,
VALOR_PRO FLOAT NOT NULL
);
CREATE TABLE FORNECEDOR (
CNPJ CHAR (17) PRIMARY KEY, -- "99.999.999.9999-9"
NOME_FOR VARCHAR (60) NOT NULL,
TELEFONE_FOR VARCHAR (12) NOT NULL, -- 00 0000-0... | true |
7fb5113bf18c6a0c72f84cf58fa9e7a7e3d3e78e | SQL | gxlioper/ecology | /data/Oracle/sql201610240301.sql | GB18030 | 2,133 | 2.640625 | 3 | [] | no_license | delete from HtmlLabelIndex where id=128841
/
delete from HtmlLabelInfo where indexid=128841
/
INSERT INTO HtmlLabelIndex values(128841,'״ͼ')
/
INSERT INTO HtmlLabelInfo VALUES(128841,'״ͼ',7)
/
INSERT INTO HtmlLabelInfo VALUES(128841,'Pie Chart',8)
/
INSERT INTO HtmlLabelInfo VALUES(128841,'D',9)
/
delete from Ht... | true |
6bf2f92d1742546ef6c376dfa741cefd2f2f639f | SQL | altamira/vstfs | /altamira-bpm/altamira-bpm/src/main/resources/ddl/QUOTATION_ITEM_QUOTE.sql | UTF-8 | 2,965 | 3.34375 | 3 | [] | no_license | --------------------------------------------------------
-- Arquivo criado - Segunda-feira-Fevereiro-10-2014
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table QUOTATION_ITEM_QUOTE
------------------------------------------------------... | true |
e2d1b309fa7fa16fee7076c767ed0901534a7de3 | SQL | Margi13/BGFolklore | /Documentation/DBScripts/InsertEthnoAreaImages.sql | UTF-8 | 11,039 | 2.703125 | 3 | [
"MIT"
] | permissive | /*DELETE FROM bgfolklore.images WHERE EthnoAreaId = "1";
DELETE FROM bgfolklore.images WHERE EthnoAreaId = "2";
DELETE FROM bgfolklore.images WHERE EthnoAreaId = "3";
DELETE FROM bgfolklore.images WHERE EthnoAreaId = "4";
DELETE FROM bgfolklore.images WHERE EthnoAreaId = "5";
DELETE FROM bgfolklore.images WHERE EthnoAr... | true |
3199ca4b93e232e9233267a823464c6546ae31c2 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.User_ListFavorites.PRC | UTF-8 | 1,277 | 3.8125 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[User_ListFavorites]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[User_ListFavorites]
GO
CREATE Procedure dbo.User_ListFavorites
(
@UserID int,
@IsCaller int = 0
)
As
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ U... | true |
6b8a9640ea8d16ade8f5593c751d1a38100b1ad7 | SQL | jmarca/CalVAD-PEMS-StationsParse | /sql/restore.views.sql | UTF-8 | 8,918 | 3.53125 | 4 | [] | no_license | create view vds_geoview_full as
SELECT vds_geoview.id,
vds_geoview.name,
vds_freeway.freeway_id,
vds_geoview.freeway_dir,
vds_geoview.lanes,
vds_geoview.length,
vds_geoview.cal_pm,
vds_geoview.abs_pm,
vds_geoview.latitude,
vds_geoview.longitude,
vds_geoview.last_modified,
vd... | true |
d996963b489a98fcff3ff3a985b0759ecef7f080 | SQL | BranceLee/SQL | /sql_06/db.sql | UTF-8 | 661 | 3.859375 | 4 | [] | no_license | -- 性别交换
CREATE TABLE salary (
id integer PRIMARY KEY NOT NULL,
name varchar(255),
sex varchar(20),
salary integer
);
INSERT INTO salary (id, name, sex, salary) values (0, 'Alice', 'f', 2500) ;
INSERT INTO salary (id, name, sex, salary) values (1, 'Bob', 'm', 4000) ;
INSERT INTO sal... | true |
a15d1cc9296da9ac16826e205b459f33884d2327 | SQL | Dyb3438/Linux_WinterVacation | /forum.sql | UTF-8 | 1,382 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 2018-01-25 14:44:11
-- 服务器版本: 5.7.19
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
51b371c2834814fe94222e189d9eba67c4675128 | SQL | ruanhq/Leetcode | /Algorithm/DS_sql.sql | UTF-8 | 941 | 3.859375 | 4 | [] | no_license | #1. ownership in your area
#2. show leadership, develop the strategy and have an impact
#3. Core mission is to make an impact on real people through our technology.
#Upstart's mission really that's exactly what I'm going to implement in my daily work.
#Table A: columns: user_id, action("on"/ "off"), date, time
#date... | true |
0de358b33b83db3ae0abd853203a631d77ebb500 | SQL | majia2968/Mental-Health-eScreening | /escreening/src/main/sql/sprint_26/26_sprint26_reference_data_templates.sql | UTF-8 | 18,100 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | update template set template_file =
'<#include "clinicalnotefunctions">
<#-- Template start -->
${MODULE_TITLE_START}
Depression:
${MODULE_TITLE_END}
${MODULE_START}
<#if (var1550.children)?? && (var1560.children)?? && (var1570.children)?? && (var1580.children)?? && (var1590.children)??
&& ((var1550.children)?siz... | true |
169f42e605b4630dae4273a8eb666f31f3799421 | SQL | spatten35/data-engineering-exercise | /tables.sql | UTF-8 | 2,789 | 2.515625 | 3 | [] | no_license | CREATE TABLE Books(
"subtitle" varchar(50),
"weight" varchar(15),
"covers" int,
"latest_revision" int,
"edition_name" varchar(50),
"title" varchar(50),
"languages_key" varchar(15),
"subjects" varchar(100),
"physical_dimensions" varchar(30),
"revision" int,
"publishers" varchar(50),
"physical_for... | true |
26d9b337e8525361176085c9b682e97ad885f186 | SQL | daniel70125/persistent-session | /server/db/seed.sql | UTF-8 | 249 | 3.09375 | 3 | [] | no_license | create table roles (
id serial primary key,
name varchar(20)
);
insert into roles (
name
) values ('Admin'), ('Super Admin');
create table users (
id serial primary key,
email varchar(255),
hash text,
role_id int references roles(id)
); | true |
ecd3504f38405ac601efd071e31d624935ec1271 | SQL | HaydenDC/HaydenDC.github.io | /SSBDB.sql | UTF-8 | 971 | 2.9375 | 3 | [] | no_license |
--Player--
CREATE TABLE player
(
id SERIAL PRIMARY KEY
, first_name VARCHAR(10) NOT NULL
, last_name VARCHAR(15) NOT NULL
, user_name VARCHAR(12) NOT NULL
, password VARCHAR(12) NOT NULL
);
--Player_smash_level--
CREATE TABLE Player_smash_level
(
id SERIAL PRIMARY KEY
, player_id INT REFERENCES player(id)... | true |
8214afab1b522db82dae9cf900e193ca44ff7500 | SQL | philipptokarev/todolist | /sql_task.sql | UTF-8 | 2,109 | 4.46875 | 4 | [] | no_license | SQL task.
1. Get all statuses, not repeating, alphabetically Ordered
SELECT DISTINCT status FROM tasks ORDER BY status ASC;
2. Get the count of all tasks in each project, Order by tasks count
descending
SELECT projects.name, COUNT(CASE WHEN tasks.project_id = projects.id THEN 1 END) AS count
FROM projects, tasks
GRO... | true |
53f5b981311a69a0ed9154aec1f72b740f6569c9 | SQL | mhannan/printwithstyle | /admin/blogsection/blog_section(1).sql | UTF-8 | 2,030 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 22, 2012 at 10:39 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
5da854864abd4ae210d7d7ed74f3933c42c46bd9 | SQL | zgmfsrike/Chinese_Tour | /SQL database/05-04-2018 DB backup.sql | UTF-8 | 48,004 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 05, 2018 at 03:18 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
48b8975f1b84db97949e5781094f0ced6f5b14fb | SQL | ergouy/FlexPushdownDB | /normal-ssb/sql/original/query1.1.1.sql | UTF-8 | 356 | 3.5 | 4 | [] | no_license | select c_nation, s_nation, d_year, sum(lo_revenue) as revenue
from customer, lineorder, supplier, date
where lo_custkey = c_custkey
and lo_suppkey = s_suppkey
and lo_orderdate = d_datekey
and c_region = 'EUROPE'
and s_region = 'EUROPE'
and d_year >= 1998
and d_year <= 1998
group by c_nation, s_nation, d_yea... | true |
7a4b4e3fc25c6fe43e00948635ef48bbd4a3f687 | SQL | narayanan-nithya/EmployeeSQLAnalysis | /employee_queries.sql | UTF-8 | 1,067 | 3.609375 | 4 | [] | no_license | select * from departments
select * from employee_info
select * from employee_info Where hire_date LIKE '1986_%';
select dm.dept_no,dm.emp_no,dm.from_date,dm.to_date,ei.first_name, ei.last_name INTO manager_information
from employee_info ei
join dept_manager dm on
dm.emp_no = ei.emp_no;
select d.dept_no,d.dept_name,... | true |
e3f5978ac6d64d9b7ac13b179c58fae177205a52 | SQL | GladsonAntony/HackerRank_SQLInOracle | /Practice/SQL/2. Basic Join/5. Top Competitors.sql | UTF-8 | 431 | 4.03125 | 4 | [] | no_license | SELECT
S.HACKER_ID,
H.NAME
FROM
HACKERS H
JOIN SUBMISSIONS S ON S.HACKER_ID = H.HACKER_ID
JOIN CHALLENGES C ON C.CHALLENGE_ID = S.CHALLENGE_ID
JOIN DIFFICULTY D ON C.DIFFICULTY_LEVEL = D.DIFFICULTY_LEVEL
WHERE
D.DIFFICULTY_LEVEL = C.DIFFICULTY_LEVEL
AND D.SCORE = S.SCORE
GROUP BY
S.H... | true |
a9b73fbd155e583b7000b651d047e3b8cbdc3522 | SQL | jbkey2015/Chinook | /Chinook12-15.sql | ISO-8859-1 | 1,068 | 4.09375 | 4 | [] | no_license | --Provide a query that includes the purchased track name with each invoice line item.
select Track.Name as TrackName, InvoiceLine.*
from InvoiceLine
join Track
on InvoiceLine.TrackId = Track.TrackId
--Provide a query that includes the purchased track name AND artist name with each invoice line item.
select... | true |
27b31ba48374643d114396a3ec5956bafa50307b | SQL | s1t3w4n/2019-08-otus-spring-avetisian | /HW13-spring-security-authorization/src/main/resources/data.sql | UTF-8 | 1,846 | 2.859375 | 3 | [] | no_license | insert into genre (id, genre) values (1, 'novel');
insert into genre (id, genre) values (2, 'fantasy');
insert into genre (id, genre) values (3, 'detective');
insert into authors (id, last_name, first_name) values (1, 'Pushkin', 'Alexander');
insert into authors (id, last_name, first_name) values (2, 'Tolkien', 'John')... | true |
24822b972e9841e6a289d7618afc7ae81a29d181 | SQL | mmartine2008/prj.jv2018 | /Scripts Alimentacion y Kurt/2520.sp_diagnostico_gestacion.sql | UTF-8 | 6,153 | 3.328125 | 3 | [] | no_license | SET TERM ^ ;
CREATE OR ALTER PROCEDURE SP_DIAGNOSTICO_GESTACION(
DIAS_GESTACION INTEGER,
CRONOLOGIA_DENTARIA INTEGER,
CONDICION_CORPORAL INTEGER,
METODO_DIAGNOSTICO INTEGER,
ESTADO_REPRODUCTIVO INTEGER,
MUESTREO VARCHAR(1) CHARACTER SET NONE,
MUCUS VARCHAR(1) CHARACTER SET NONE,
CONDICION_UTE... | true |
93fb53e1e2d968b98aed5ff286fecb82b182d0f3 | SQL | maciok/initializer | /src/main/resources/db/migration/V1.0.0__product_scheme.sql | UTF-8 | 212 | 2.625 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS product
(
uuid VARCHAR(255) NOT NULL CONSTRAINT pk_product PRIMARY KEY,
name VARCHAR(255) NOT NULL,
article_id INTEGER NOT NULL,
last_updated TIMESTAMP NOT NULL DEFAULT NOW()
); | true |
91b5d508c4df80005a1a2b92d20578ceb489f51b | SQL | frandy008/sisfo_pendataan_pesanan_kue | /db_sisfo_kue.sql | UTF-8 | 6,332 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 17, 2021 at 03:19 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
95a62d56b51297cadcc71462388f3479d0b96d17 | SQL | ines-d/Brief | /Brief_SGBD/SGBD_base_de_données_relationnelle.sql | UTF-8 | 3,601 | 4.125 | 4 | [] | no_license | # 3 - Créer une base de données "netflix"
create database netflix;
use netflix;
# avant de creer les tables il faut ecrire sur le terminal mysql --local-infile=1 -u root -p/mysql --local-infile=1 -u ines -p
mysql --local-infile=1;
# 4 - Créer une table appelée ‘netflix_title’, importer les données provenant du fichier... | true |
42e0a188109eb20f4bd1504de40f7568bd5e24fb | SQL | franksterge/HorizanDB | /Database Schema/HorizanDBProcedures.sql | UTF-8 | 35,287 | 4.0625 | 4 | [] | no_license | /*
view to get all tips
Usage:
select * from vTips
*/
Use HorizanDB;
Create
View vTips as (
Select t.TipTitle, t.TipDetail, i.ImageName, i.ImagePath
from Tips t join ImageDetail i on t.ImageID = i.ImageID
)
/*
stored procedure to get all favorite colleges form user
Usage:
Call pGetHo... | true |
acd58fe43c528eb0e5ad57604c355cc8484d6b75 | SQL | moutainhigh/work-ms-msBoss | /src/main/resources/doc/BigFiles/明师/2017-02-22 getFinalChangeToContractId .sql | UTF-8 | 589 | 3.34375 | 3 | [] | no_license | drop function if exists `getFinalChangeToContractId`;
DELIMITER ;;
CREATE FUNCTION `getFinalChangeToContractId`(contract_id int) RETURNS int(11)
BEGIN
declare final_change_to_contract_id int;
declare temp_contract_id int;
set temp_contract_id = contract_id;
WHILE (temp_contract_id is not null) DO
set temp_... | true |
355b475f952ba233b381da593473cc362f12d864 | SQL | MarcoGhise/SpringJunitTest | /src/main/resources/db/mysql/initDB.sql | UTF-8 | 218 | 2.53125 | 3 | [] | no_license | drop schema junit;
create schema junit;
use junit;
DROP TABLE IF EXISTS Customers;
CREATE TABLE Customers (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30),
last_name VARCHAR(30),
PRIMARY KEY (`id`)); | true |
38059ef54bbd214010db1e08262ed13d5e4117c7 | SQL | kebaparis/kebaparis | /sql/insert.sql | UTF-8 | 936 | 2.78125 | 3 | [] | no_license | USE kbp;
###################################### I N S E R T S I N T O D B ##########################
### U S E R S ###
INSERT INTO users (name, password, email, id_type, active, ip) VALUES
('user1', MD5('1'),'user1@kebaparis.ch','1',TRUE,'255.255.255.255'),
('user2', MD5('1'),'user2@kebaparis.ch','1',TRUE,'2... | true |
f4ce984bacec451564d2a398e5900dfc8f310d00 | SQL | ahmadtechcampus2/ahmad4 | /برنامج الامين المحاسبي/Bin/System/Sys/vwPOSSD_Salesman.sql | UTF-8 | 414 | 2.5625 | 3 | [] | no_license | ################################################################################
CREATE VIEW vwPOSSDSalesman
AS
SELECT
[GUID],
CAST ([Number] AS NVARCHAR) AS Number,
[Name],
[LatinName],
[CostCenterGUID],
[Mobile],
[Email],
[Address],
[Department],
[Security]
FROM POSSDSalesman000
WHERE IsWork... | true |
cdc59562568c1cfa29c9ca70f3e43ad1f18a30f2 | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_get_StkTfrInInvalidItems.sql | UTF-8 | 413 | 3.140625 | 3 | [] | no_license | CREATE PROCEDURE sp_get_StkTfrInInvalidItems(@DocSerial INT)
AS
SELECT StockTransferOutDetailReceived.ForumCode
FROM StockTransferOutDetailReceived
WHERE DocSerial = @DocSerial AND
(
Isnull(StockTransferOutDetailReceived.Product_Code,N'') NOT IN (SELECT PRODUCT_CODE FROM Items)
or
Isnull(StockTransf... | true |
9f4e0a3f757dfe7c826748df6465441cdc7ceae4 | SQL | Bibbicasse/phpAvance | /portfolio/myresume/database.sql | UTF-8 | 7,855 | 3.515625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : lun. 31 mai 2021 à 13:42
-- Version du serveur : 5.7.24
-- Version de PHP : 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
65d87cfd931ae2c6f9e45d99e77bfb0c1b0ed9db | SQL | Tarik-MOUBARIKI/Application-pour-le-visionnement-d-images-et-playlist-musicale-master | /Desktop/reservation-vols-AppNodejs/db/restn_vols.sql | UTF-8 | 10,950 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : Dim 31 jan. 2021 à 21:36
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... | true |
da2c8f167a6f60a8969209393f0026b749a351f6 | SQL | ulancho/Sun-city | /db_reserves.sql | UTF-8 | 7,817 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Авг 07 2018 г., 17:38
-- Версия сервера: 5.7.20
-- Версия PHP: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
e6b46d4dda14f5cff958aac15b3ebdbc601743cc | SQL | varunu28/SQL-Scripts | /CodeFights/Would you LIKE the Second Meal?/newsSubscribers.mysql | UTF-8 | 396 | 3.421875 | 3 | [] | no_license | /*Please add ; after each select statement*/
CREATE PROCEDURE newsSubscribers()
BEGIN
SELECT DISTINCT subscriber
FROM (
SELECT subscriber
FROM full_year
WHERE INSTR(newspaper, 'Daily') > 0
UNION
SELECT subscriber
FROM half_year
WHERE INSTR(newspaper,... | true |
3205340496d00ea7a7b876ee36df57dd34862c94 | SQL | TvanSchagen/scm-ddg | /DummyDataGenerator/Queries/SQL/Adjacency List/Q5.sql | UTF-8 | 1,989 | 3.84375 | 4 | [
"Apache-2.0"
] | permissive | WITH RECURSIVE cte (
q5, business_type, parent_pname, parent_pid, parent_oid, parent_oname, child_ean, child_pname, child_pid, child_oid, child_oname
)
AS
(
SELECT parent.ean, CASE WHEN child_org.number_of_employees > 5000 THEN "Large" WHEN child_org.number_of_employees < 1000 THEN "Small" ELSE "Regular" END AS busin... | true |
2995dc8f5899f51f301c01a3a2ed8b617c324949 | SQL | federicobernardin/xflextemplate | /ext_tables.sql | UTF-8 | 912 | 2.671875 | 3 | [] | no_license | #
# Table structure for table 'tt_content'
#
CREATE TABLE tt_content (
xtemplate varchar(255) DEFAULT '' NOT NULL,
xflextemplate text NOT NULL,
xft_files text NOT NULL,
);
#
# Table structure for table 'tx_xflextemplate_template'
#
CREATE TABLE tx_xflextemplate_template (
uid int(11) NOT NULL auto_inc... | true |
e8462b5ce0d145bef741392fed00ae4333d0b88e | SQL | IQQcode/Code-and-Notes | /SQL/SQL Projects/便签Demo/便签Demo.sql | UTF-8 | 1,939 | 4.03125 | 4 | [] | no_license | create database if not exists memo charset=utf8 collate utf8_general_ci;
use memo;
--1.便签组表(主表)
--编号 -- 组名称 -- 创建时间 -- 修改时间 -- 删除时间
create table if not exists notes_group(
id int primary key auto_increment comment'便签组编号',
group_name varchar(10) unique comment'组名称',
create_time datetime comment'创建时... | true |
a6a58b2cdac63c1fbe2578bb31f089d95725517b | SQL | mpsgit/MAPS_BLACKBELT_DATABASE_SCRIPTS | /Support/forecast_boost_1547/install.sql | UTF-8 | 1,072 | 2.734375 | 3 | [] | no_license | PROMPT
PROMPT Installing Support_Issue_1547
PROMPT
set feedback off termout off pagesize 0
col log_file new_value log_file
select user||'_'||instance_name||'_'||to_char(sysdate, 'yyyy-mm-dd')||'_install_support_issue_1547.log' log_file from v$instance;
set feedback on termout on
spool '&log_file'
set serveroutput o... | true |
db0819fa05c287653c3a6fba85d8ddf249f15d36 | SQL | bellmit/ws | /0 项目文档/.svn/pristine/6d/6d292faa79ea6f3c5e41ac71ad487b34515ed3b4.svn-base | UTF-8 | 666 | 3.203125 | 3 | [] | no_license | CREATE TABLE "LIFE".t_market_channel (
"ID" NUMBER(20) NOT NULL,
goods_no NUMBER(20) NOT NULL,
goods_name NVARCHAR2(50) NOT NULL,
position NVARCHAR2(2) NOT NULL,
CONSTRAINT pk_t_market_channel PRIMARY KEY ("ID")
);
ALTER TABLE "LIFE".t_market_channel ADD SUPPLEMENTAL LOG GROUP ggs_240627 ("ID") ALWAYS;
COMMEN... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.