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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
92a4f51c6b1aa0f362a7a01150bc906348e3d186 | SQL | ShambhabiPoudyal/ECE656_Project_F20 | /project.sql | UTF-8 | 11,435 | 4.28125 | 4 | [] | no_license | -- search movies
https://stackoverflow.com/questions/14290857/sql-select-where-field-contains-words
SELECT * FROM mytable
WHERE column1 LIKE '%word1%'
OR column1 LIKE '%word2%'
OR column1 LIKE '%word3%'
If you need all words to be present, use this:
SELECT * FROM mytable
WHERE column1 LIKE '%word1%'
... | true |
c1a697b838d04e02bc6a6f1a63ded8395f3fe965 | SQL | Sofiaya1726/Database-Principle | /LocaLibrary/Resources/book.sql | UTF-8 | 6,357 | 2.96875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.10.11
-- http://www.phpmyadmin.net
--
-- 主机: 127.0.0.1:3306
-- 生成日期: 2020-06-20 23:38:39
-- 服务器版本: 5.5.62-log
-- PHP 版本: 5.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_C... | true |
1a5c73d6039b3f05c450e88c03adbeff1368f94c | SQL | yaodwwy/JavaTutorials | /.dev/sql/PB_20150924复习.sql | UTF-8 | 269 | 3.609375 | 4 | [] | no_license | --列出至少有一个员工的所有部门
SELECT * FROM (
SELECT count(emp.deptno) eco,dept.dname FROM dept,emp
WHERE emp.deptno = dept.deptno
GROUP BY dept.dname
ORDER BY eco
),emp WHERE eco > 1;
SELECT deptno FROM emp GROUP BY deptno HAVING COUNT(*) > 1;
| true |
c99bf57067817eaf4277b433bd1566cb74130e92 | SQL | rminder/MHS | /Database/OdsStaging/SL/Views/vwGLSetup.sql | UTF-8 | 1,377 | 2.8125 | 3 | [] | no_license | CREATE VIEW [SL].[vwGLSetup]
AS
--
-- This view is intended to read rows from the Ods Staging table and
-- map the columns to match the Ods table. Among other potential uses
-- it's used in the SSIS package that brings data into ODS.
--
SELECT
RTRIM(SetupId) AS SetupId
,RTRIM([BegFiscalYr]) AS BeginFiscalYear
... | true |
e96312535303b6e37cebbe26f278b62ecb097040 | SQL | vandfilbert/foodranger | /foodranger.sql | UTF-8 | 7,212 | 3.09375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 29, 2019 at 06:23 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
9954918874098ac58f7764fb5363bd688bf95d0d | SQL | gazelle98/database | /First Assignment/تمرین اول _ سوال اول/Data-Export1.sql | UTF-8 | 7,929 | 3.203125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
--
-- Host: localhost Database: Exercise1
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... | true |
d285375d76ba6586407d4f4b9b7a9a19b410a2cf | SQL | tarawithtiaras/335 | /University DB/course3.sql | UTF-8 | 1,652 | 2.625 | 3 | [] | no_license | REM COURSE TABLE *************************************
REM SCHEMA IN PARENTHESES ARE NOT REQUIRED; JUST A REMINDER
insert into course (course_id, title, dept_name, credits)
values ('BIO-101', 'Intro. to Biology', 'Biology', 4);
insert into course (course_id, title, dept_name, credits)
values ('BIO-301', 'Genet... | true |
7cc56a5e180594352cd1b7e47df30c8ecb2035c5 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/cck_restr.sql | WINDOWS-1251 | 6,324 | 3.046875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CCK_RESTR.sql =========*** Run *** ===
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
9cccdc60c8493a13aee46f3260736729a7f045dd | SQL | szp35/FreePOS-Wpf | /FreePOS Application/data/freepos.sql | UTF-8 | 9,214 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
/*!40101 SET NAMES utf8mb4 */;
CR... | true |
4801f1b7b5a88eb380215b91cbabb91e819aa11d | SQL | Harmanankohli/ProjectResourceAllocator | /Project Resource Allocator/QUEUE.sql | UTF-8 | 751 | 3.078125 | 3 | [] | no_license | create database QUEUE
use QUEUE
CREATE TABLE PROJECT
(
PID INT PRIMARY KEY,
PNAME VARCHAR(100),
CID INT REFERENCES CLIE(CID) ,
PSD DATE,
PED DATE,
STATP VARCHAR(100)
);
CREATE TABLE CLIE
(
CID INT PRIMARY KEY,
CNAME VARCHAR(100),
STATC VARCHAR(100)
);
CREATE TABLE RESOURCES
(
EID INT PRIMARY KEY,
ENAME VARCHAR(100),
... | true |
1e0fb1e910df5f9aaa685e74d31322dc835fcda8 | SQL | Blaklis/my-challenges | /phprivate/db.sql | UTF-8 | 2,499 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Mar 19 Mars 2019 à 00:52
-- Version du serveur : 5.7.25-0ubuntu0.18.04.2
-- Version de PHP : 7.2.15-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 S... | true |
c7992683d21c916648c4f1fae59f8cecade78cdb | SQL | hedulewei/cdm | /doc/sql/config.sql | GB18030 | 2,094 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | --------------------------------------------------------
-- ļѴ - --28-2017
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table CONFIG
--------------------------------------------------------
CREATE TABLE "CITY"."CONFIG"
( "COUNTY... | true |
7c0d0f0dedf640b67279a101a6d0dc84b2c64dcf | SQL | kawabata-neolis/KATO | /KATO/SQL/A0170_ShukoShoninInput/ShukoShoninInput_PrintData_SELECT.sql | UTF-8 | 622 | 3.09375 | 3 | [] | no_license | SELECT RTRIM(dbo.f_getメーカー名(メーカーコード))
+ ' ' + RTRIM(dbo.f_get中分類名(大分類コード,中分類コード))
+ ' ' + Rtrim(ISNULL(C1,''))
+ ' ' + Rtrim(ISNULL(C2,''))
+ ' ' + Rtrim(ISNULL(C3,''))
+ ' ' + Rtrim(ISNULL(C4,''))
+ ' ' + Rtrim(ISNULL(C5,''))
+ ' ' + Rtrim(ISNULL(C6,'')) AS 商品名,
数量 AS 数量,
NULL AS 得意先名,
... | true |
9eaffc23694be983bcf5b1afcfc378b63ef7681c | SQL | guanlinglee/tentcoo-mybatis-startup | /SQL/create.table.sql | UTF-8 | 303 | 3.46875 | 3 | [] | no_license | CREATE TABLE tb_class (
f_class_id VARCHAR(32) PRIMARY KEY,
f_class_name VARCHAR(64)
);
CREATE TABLE tb_student (
f_student_number VARCHAR(32) PRIMARY KEY,
f_student_name VARCHAR(64),
f_class_id VARCHAR(32),
CONSTRAINT fk_student_class FOREIGN KEY (f_class_id) REFERENCES tb_class(f_class_id)
); | true |
4f3fe27df1c579bca423fc13f0ca5d09d660b8a8 | SQL | RencurelP/TP3_WebApp_RENCUREL_Pierre | /tp_3_rencurel_pierre.sql | UTF-8 | 4,539 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Ven 17 Mars 2017 à 12:53
-- Version du serveur : 5.7.14
-- Version de PHP : 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
fcc8ed38b13aa4756eb693b35b1043912f55a41b | SQL | saenzpardo/SQLServer | /Murach_downloads/Scripts/Chapter 07/Figure 7-06a.sql | UTF-8 | 164 | 2.71875 | 3 | [] | no_license | USE AP;
UPDATE InvoiceCopy
SET CreditTotal = CreditTotal + 100,
InvoiceDueDate = (SELECT MAX(InvoiceDueDate) FROM InvoiceCopy)
WHERE InvoiceNumber = '97/522';
| true |
b44f306b85e7f30763a2091e96495d6526be8980 | SQL | richardsk/nzor | /Source/NZOR.Database/NZOR.Database.Data/Schema Objects/Schemas/provider/Tables/Keys/TaxonProperty.frkTaxonPropertyTaxonPropertyClass.fkey.sql | UTF-8 | 196 | 3.359375 | 3 | [] | no_license | ALTER TABLE consensus.[TaxonProperty]
ADD CONSTRAINT [frkTaxonPropertyTaxonPropertyClass]
FOREIGN KEY (TaxonPropertyClassID)
REFERENCES dbo.TaxonPropertyClass (TaxonPropertyClassID)
| true |
52dcb3e614bd5841cb3a63b839be7026622f0587 | SQL | evrimulgen/Oracle-DBA-Life | /INFO/Books Codes/Oracle PLSQL Tips and Techniques/OutputChapter04/4_26.sql | UTF-8 | 1,124 | 3.078125 | 3 | [
"MIT"
] | permissive | -- ***************************************************************************
-- File: 4_26.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please repo... | true |
453c7d71eed3d8147f66c874ff0181bb86641fa0 | SQL | duynguyen4493/18php02 | /Session19/data.sql | UTF-8 | 1,192 | 3.828125 | 4 | [] | no_license | SELECT `name` FROM `users` WHERE `phone` LIKE '098%'
SELECT `name` FROM `users` WHERE `email` LIKE '%@gmail%'
SELECT `name` FROM `users` WHERE `name` LIKE '%o%' AND `name` LIKE '%a%'
SELECT `name` FROM `users` WHERE `phone` LIKE '098%' AND `name` LIKE '%a%'
SELECT `name` FROM `users` WHERE `phone` LIKE '_8%'
SELECT * ... | true |
2a53f152df6be7a768021854c05fe8034fb5880d | SQL | nehaaghara/Brain-Box | /DbScript/vikasfinalllllllllllllllllllllllllllllllcheeeeeeeeeeeeeeeeeeee.sql | UTF-8 | 7,096 | 3.359375 | 3 | [] | no_license | /*
SQLyog Community v13.0.1 (64 bit)
MySQL - 5.7.19 : Database - brainbox
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIG... | true |
893d2ab109cf4a099230f81006b3ce3926a96300 | SQL | jenefabrando/staging-server | /religion.sql | UTF-8 | 2,402 | 3.125 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = fals... | true |
da3c1b1ba2cee702661136ee918a71fceb6fe925 | SQL | chamberSccc/program | /memberManage/mysqlScript/danboBusiness_image.sql | UTF-8 | 2,365 | 2.84375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: 127.0.0.1 Database: danboBusiness
-- ------------------------------------------------------
-- Server version 5.7.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
0fb69225ff535cbebe781c721b3731fb693f27c4 | SQL | patchsoft/postcode | /sql/match.sql | UTF-8 | 1,499 | 3.046875 | 3 | [
"BSD-2-Clause"
] | permissive | SELECT
code,
qry,
code % qry AS match,
code % qry = expect AS pass
FROM (
VALUES
('EC4Y 0HQ'::postcode, '', false),
('EC4Y 0HQ'::postcode, 'EC4Y 0HQ', true),
('EC4Y 0HQ'::postcode, 'EC4Y 0', true),
('EC4Y 0HQ'::postcode, 'EC4Y ', true),
('EC4Y 0HQ'::postcode, 'EC4Y', ... | true |
5bd856c6f3b48224204835211d69f6d9403c1eac | SQL | willygodwin/sos-labour | /seeds.sql | UTF-8 | 2,080 | 2.890625 | 3 | [
"MIT"
] | permissive | USE project2_development;
INSERT INTO users (user_type,email,password) VALUES
('company','zorzi@zorzi.com.au','$2a$10$g92sB9YAdqUhha5uJcfTpOcST5g30y2lzLWsDL3a/4rWT8qtxsy.K'), -- password: zorzihomes
('company','summithomes@summithomes.com.au','$2a$10$etuJLD29Ws9VYMyXAdoT5u8OIZTpqW74xUluXvYzDBWWK5oN3uOLC'), -- password... | true |
5b045ae972486a3ebd1fc8463480971df3136a32 | SQL | TakiyaHideto/hive_eleme | /dim_mdl_common_food_name_complement.sql | UTF-8 | 2,746 | 3.9375 | 4 | [] | no_license | #***************************************************************************************************
# ** 文件名称: dim_mdl_common_food_name_complement.sql
# ** 功能描述: 补充dim_mdl_common_food_name_complement表中正则菜品名称
# ** 创建者: jiahao.dong
# ** 创建日期: 2016-09-26
#******************************************************************... | true |
c77a761c0424321d354b86e07ef6034e59882850 | SQL | thenerdsuperuser/pilfkart | /sql files/query.sql | UTF-8 | 682 | 3.5 | 4 | [] | no_license | \c pilfkart;
/*
shows the vendors whose rating is above 2
*/
select * from vendor where rating > 2;
/*
shows vendor from patna
*/
select * from vendor where vendor_loc = 'Patna';
/*
shows prodcts whose rating is above 1
*/
/*
shows products with cost above 100
*/
select prod_name, rate from product where r... | true |
ac63d13455118d0d549e3c265e533db66bee0766 | SQL | betagouv/preuve-covoiturage | /api/db/migrations/territory/20220228142759_split_territory_group.up.sql | UTF-8 | 2,652 | 4.4375 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE territory.territory_group AS
WITH territory_group_id AS
(SELECT DISTINCT au.territory_id
FROM auth.users AS au
WHERE au.territory_id IS NOT NULL)
SELECT
tt._id,
tt.company_id,
COALESCE(tt.created_at, NOW()) as created_at,
COALESCE(tt.updated_at, NOW()) as updated_at,
tt.deleted_at as deleted_at... | true |
e1a6b82dd43f8195f16e3c1f09e098b2b550a909 | SQL | nisarg291/Training-Aug-21 | /SQL/Hardik Niranjani/Day4/Practice Exercise - Day4.sql | UTF-8 | 1,242 | 3.609375 | 4 | [] | no_license |
--Group by opration using Production.TransactionHistory table--
SELECT COUNT(TransactionID) AS [Total Id], TransactionType
FROM Production.TransactionHistory
GROUP BY TransactionType
SELECT * FROM Production.TransactionHistory
--Rank and Dense rank
SELECT DISTINCT RANK() OVER(ORDER BY ActualCost ASC)[Rank],A... | true |
f84219773d3994e1c64dda40fe493373bb5e8550 | SQL | JxnuHxh/GourdMall | /out/production/GourdMall/resources/db/migration/V7__Create_orderitem_table.sql | UTF-8 | 1,039 | 4.03125 | 4 | [] | no_license | # CREATE TABLE `orderitem` (
# `itemid` varchar(32) NOT NULL,
# `quantity` int(11) DEFAULT NULL comment "购买数量",
# `total` double DEFAULT NULL comment "小计",
# `pid` varchar(32) DEFAULT NULL comment "购买商品的ID",
# `oid` varchar(32) DEFAULT NULL comment "订单项所在订单id",
# PRIMARY KEY (`itemid`),
# KEY `order_item_... | true |
3aac332b78bcff6bd6ee58a0f9282e0995302b95 | SQL | aivazashvilitekla/LARAVEL | /HM_1/dictionary.sql | UTF-8 | 2,843 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2020 at 01:37 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
c193f3f43ede096205e453b3df9a8ae9379919f7 | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/01351_parse_date_time_best_effort_us.sql | UTF-8 | 1,158 | 2.859375 | 3 | [
"BSL-1.0",
"Apache-2.0"
] | permissive | SELECT 'parseDateTimeBestEffortUS';
SELECT
s,
parseDateTimeBestEffortUS(s, 'UTC') AS a
FROM
(
SELECT arrayJoin([
'1970/01/02 010203Z',
'01-02-2001 UTC',
'10.23.1990',
'01-02-2017 03:04:05+1',
'01/02/2017 03:04:05+300',
'01.02.2017 03:04:05GMT',
'01-02-2017 03:04:05 MSD',
'01-02-2017 11:04:05 AM',
'01-02-20... | true |
dec1d15e6246fa55e3aafd7c85e1876b24029c9d | SQL | BolderBrighterExperience/playground | /intern05/TEST_PLF/exercitiul_11.sql | UTF-8 | 446 | 2.703125 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE prc_plch_customers ( l_names IN plch_customers.custname%TYPE,
l_num IN plch_customers.custnum%TYPE)
IS
TYPE rec_cust IS TABLE OF plch_customers.custnum%TYPE INDEX BY PLS_INTEGER;
l_custnum_ids rec_cust;
l_custname_ids rec_c... | true |
235c55d2dd7a02e0722ad4c77b12cd7911a13701 | SQL | Achter/java_homework-Achter | /20200531_homework1/user.sql | UTF-8 | 1,408 | 3.203125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : Achter
Source Server Version : 50515
Source Host : localhost:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50515
File Encoding : 65001
Date: 2020-05-31 20:52:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... | true |
96757a307ef6d7ed04f5a8fd096148e06cf52f68 | SQL | rpbouman/sqlsnippets | /easter/f_easter_day.hana.sql | UTF-8 | 1,890 | 3.421875 | 3 | [] | no_license | /**
* Copyright 2016 Roland.Bouman@gmail.com, Roland.Bouman@just-bi.nl,
* 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... | true |
93a07d4c4a2e63355d735db465f18c96f3bea12c | SQL | ryansat/slim-api | /database/androidbelajar.sql | UTF-8 | 3,055 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 01, 2018 at 10:58 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
f736da8a1751d45b32d8557f3c847ef0753e3fc0 | SQL | gicadmin/allo | /PHENIX/Tables/PICK_TRANSACTIONS.sql | UTF-8 | 4,732 | 3.125 | 3 | [] | no_license | CREATE TABLE phenix.pick_transactions (
pid_id NUMBER(15) NOT NULL,
pid_prf_prd_code VARCHAR2(10 BYTE) NOT NULL,
pid_prf_fmt_code VARCHAR2(7 BYTE) NOT NULL,
pid_picked_quantity NUMBER(7),
pid_picked_weight NUMBER(10,3),
pid_loc_code VARCHAR2(12 BYTE),
pid_start_date DATE NOT NULL,
pid_end_date DATE,
p... | true |
0f9cd2fed54184cb887e24a410784034ce1c086b | SQL | exastro-suite/it-automation | /ita_install_package/install_scripts/version_up/1.9.0/base_sql_ja_JP.sql | UTF-8 | 21,086 | 2.796875 | 3 | [
"Apache-2.0",
"LGPL-3.0-only",
"MIT"
] | permissive | ALTER TABLE A_ACCOUNT_LIST ADD COLUMN PW_EXPIRATION INT AFTER PROVIDER_USER_ID;
ALTER TABLE A_ACCOUNT_LIST ADD COLUMN DEACTIVATE_PW_CHANGE INT AFTER PW_EXPIRATION;
ALTER TABLE A_ACCOUNT_LIST_JNL ADD COLUMN PW_EXPIRATION INT AFTER PROVIDER_USER_ID;
ALTER TABLE A_ACCOUNT_LIST_JNL ADD COLUMN DEACTIVATE_PW_CHANGE INT AFTER... | true |
5ba141635e1892678fa66f436cebd31ab247369c | SQL | samdolson/SQL_Practice | /Codesignal/Q1/projectList.sql | UTF-8 | 202 | 2.65625 | 3 | [] | no_license | CREATE PROCEDURE projectList()
BEGIN
/* Write your SQL here. Terminate each statement with a semicolon. */
SELECT project_name, team_lead, income FROM Projects
ORDER BY internal_id ASC;
END | true |
2c17968865b727fc39dd355585625f71acf9a045 | SQL | DenislavVelichkov/Java-DBS-Module-June-2019 | /MySQL-Queries/18- EXAM PREP/12.Modify spaceship.sql | UTF-8 | 475 | 3.1875 | 3 | [
"MIT"
] | permissive | DELIMITER $$
CREATE PROCEDURE udp_modify_spaceship_light_speed_rate(spaceship_name VARCHAR(50), light_speed_rate_increse INT(11))
BEGIN
START TRANSACTION;
IF (SELECT `name` FROM spaceships WHERE `name` = spaceship_name) IS NULL
THEN SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'Spaceship you are trying to modify do... | true |
34f84de555f0c7a51bc5f84e018b5f41d855e11a | SQL | evrimulgen/Oracle-DBA-Life | /SCRIPTS/RPT/LSTTSQTA.SQL | UTF-8 | 1,942 | 3.109375 | 3 | [
"MIT"
] | permissive | REM lsttsqta.sql checked out on 6/12/97 17:05:18 version 1.4
set termout off
REM ---- Enter the User Name or the wildcard to match:%
define user_name='&1'
REM ---- Enter the Tablespace Name or wildcard to Match:%
define prefix='&2'
REM ---- Enter the Title for the top of the report:?
define app_name = '&3'
REM ---- ... | true |
fdf095399857dfc8f4cfe8b4ce35b2bcd81af43b | SQL | lihailong8586969/Chronicles | /Sql/sql-usages/2.查询平均成绩大于等于 60 分的同学的学生编号和学生姓名和平均成绩.sql | UTF-8 | 362 | 2.953125 | 3 | [] | no_license |
# mysql 如果未配置 ,不能使用 GROUP BY
set @@GLOBAL.sql_mode='';
set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
# SELECT @@sql_mode;
# SELECT @@GLOBAL.sql_mode;
SELECT * , AVG(`score`) FROM `sql`.`score` GROUP BY `student_id` HAVING AVG... | true |
683bf86f3aa7d81c81bc9df3d64fd75414afd3a0 | SQL | adhieresthenes/prog_competition | /db/_bdgdb.sql | UTF-8 | 1,985 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 05, 2015 at 11:23 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
e28b48c7580003da01a17ebd65fbce9488de3d83 | SQL | anderanakona/backendtienda | /bd_tienda.sql | UTF-8 | 3,384 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-10-2020 a las 04:29:22
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
6f34d10571c7652226e2cfd6549ebaadbe3a8339 | SQL | jlgerber/packybara-cli | /sql/register_audits.sql | UTF-8 | 1,182 | 3.296875 | 3 | [] | no_license | /*******************************************************
* Copyright (C) 2019,2020 Jonathan Gerber <jlgerber@gmail.com>
*
* This file is part of packybara.
*
* packybara can not be copied and/or distributed without the express
* permission of Jonathan Gerber
******************************************************... | true |
e9629dbb9b67455fec313e08a1790651373ddf84 | SQL | ScoutEngineeringDay/SED-Database-Test | /SED_DB_Scripts_Quantico_Mitre_MYSQL/InstructorScript.sql | UTF-8 | 1,204 | 2.875 | 3 | [] | no_license | CREATE TABLE SED_Database.sedUI_instructor(
instructor_id INT(10) ZEROFILL NOT NULL AUTO_INCREMENT PRIMARY KEY,
instructor_first_name VARCHAR(50) NOT NULL,
instructor_last_name VARCHAR(50) NOT NULL,
instructor_phone CHAR(10),
instructor_email VARCHAR(50) NOT NULL,
instructor_status ENUM('ACTIVE', 'INACTIVE') N... | true |
608f69800c4c447ae63ba2ef630cf3d012378261 | SQL | djwhitten/eHMP | /chef-repo/project_cookbooks/ehmp_oracle/files/default/oracledb/pcmm/pcmm_types.sql | UTF-8 | 661 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | --------------------------------------------------------
-- DDL for PCMM Types
--------------------------------------------------------
CREATE OR REPLACE TYPE PCMM.TEAMS_ROW FORCE AS OBJECT (
TEAM_ID NUMBER,
TEAM_NAME VARCHAR2(255),
PCM_STD_TEAM_CARE_TYPE_ID NUMBER(20),
STATIONNUMBER VARCHAR2(50),
STAFF_IEN... | true |
59904fcd735c936095475f6152ff1a9b81a3d399 | SQL | salvajih/LSC-Grants | /Easygrants_Web_LSC/Easygrants_Web_LSC/DBScripts/Build 10.x/Build 10.3/07_Create_vLSC_TIG_CONTRACT.sql | UTF-8 | 174 | 2.703125 | 3 | [] | no_license | CREATE VIEW vLSC_TIG_CONTRACT
AS
SELECT lsc_tig_contract_id,
ISNULL(contract_amount_tig, 0) + ISNULL(contract_amount_other, 0) contract_amount_total
FROM lsc_tig_contract | true |
6c59800884653a764c87397a17b5da313951789c | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.WS_PJADDR_INSERT.sql | UTF-8 | 1,418 | 2.765625 | 3 | [] | no_license | CREATE PROCEDURE WS_PJADDR_INSERT
@ad_id01 char(30), @ad_id02 char(30), @ad_id03 char(16), @ad_id04 char(16), @ad_id05 char(4), @ad_id06 char(4), @ad_id07 float,
@ad_id08 smalldatetime, @addr_key char(48), @addr_key_cd char(2), @addr_type_cd char(2), @addr1 char(60), @addr2 char(60),
@city char(30), @comp_name char(... | true |
be02382ded0f5f9896410a79b5f5b81d0015c25f | SQL | Believeint/php_fpdf | /db1.sql | UTF-8 | 1,332 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 05, 2016 at 02:50 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 |
1533a13fbf47b214f6037ebe877aec6059e81695 | SQL | kzzzr/data-vault-etl | /DWH/OPERSVODKA/1-STG_REFERENCE/DDL/STG_OPERSVODKA.STG_REFERENCE.sql | UTF-8 | 559 | 2.921875 | 3 | [] | no_license | DROP TABLE IF EXISTS STG_OPERSVODKA.STG_REFERENCE ;
CREATE TABLE IF NOT EXISTS STG_OPERSVODKA.STG_REFERENCE (
SRC_SYSTEM VARCHAR(64) NOT NULL DEFAULT 'EXCEL FILE',
SCENARIO VARCHAR(64) NOT NULL DEFAULT 'REFERENCE TABLE',
BUSINESS_DT DATE NOT NULL DEFAULT GETDATE(),
ID_PLANT_PRODUCT VARCHAR(64) NOT NULL,
PLANT VAR... | true |
64eb6ec0106314a4cdfca32db7981fee0c282f91 | SQL | jtmorrisbytes/sql-2-afternoon | /part3.sql | UTF-8 | 428 | 3.859375 | 4 | [] | no_license | --1
select genre.name, count(track_id) from track
inner join genre on genre.genre_id = track.genre_id
group by genre.genre_id;
--2
select genre.name, count(track_id) from track
inner join genre on genre.genre_id = track.genre_id
where genre.name in ('Pop', 'Rock')
group by genre.genre_id;
--3
select sum(album.album_id)... | true |
3d25e935389e1165ef09dc95445b9b51d647399a | SQL | waitingwei/wnm617_202090_01 | /ting.wei/data/track_users.sql | UTF-8 | 3,975 | 2.875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 17, 2020 at 02:48 PM
-- Server version: 5.6.49-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... | true |
3adf7f4ab86d5d1b83a5b1cbaad2a3e857d2497c | SQL | hxmn/WIM | /PPDM/IHS PPDM US Data/LOGS/Table TLM_WELL_LOG_TRIP.sql | UTF-8 | 22,829 | 3.1875 | 3 | [] | no_license | ALTER TABLE PPDM.TLM_WELL_LOG_TRIP
DROP PRIMARY KEY CASCADE;
DROP TABLE PPDM.TLM_WELL_LOG_TRIP CASCADE CONSTRAINTS;
CREATE TABLE PPDM.TLM_WELL_LOG_TRIP
(
UWI VARCHAR2(20 BYTE) NOT NULL,
SOURCE VARCHAR2(20 BYTE) NOT NULL,
JOB_ID VARCH... | true |
6c403885a3b5de58ef8f1083fc96e96b8c6c9b84 | SQL | radtek/abs3 | /sql/mmfo/bars/Trigger/tal_audit_connect.sql | WINDOWS-1251 | 1,500 | 2.640625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Trigger/TAL_AUDIT_CONNECT.sql =========*** R
PROMPT =====================================================================================
PROMPT *** Create trigger T... | true |
f5d0ba39d38f3ac54a5ebe998b3f1b0c4400d579 | SQL | llealgt/ML_log_book | /SQLScripts/01DBCreation.sql | UTF-8 | 15,752 | 3.734375 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- lun 16 ene 2017 21:57:14 CST
-- 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... | true |
c2e89464ac10570d997ca1f6475de9087d6b831f | SQL | edoappp123/md-github | /psb.sql | UTF-8 | 2,242 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 08, 2018 at 03:19 PM
-- Server version: 5.1.36
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
029211018cecbe4e4de075555ea13ffe1180cce4 | SQL | korrakot/CheckTimein | /Database Mysql/checkintime.sql | UTF-8 | 6,731 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 24, 2016 at 04:29 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
c6d4fe93076dedc21d935994088ca1ef46824252 | SQL | vazzanag/DOS_INL | /GTTS/INLDB/persons/Stored Procedures/GetPersonsUnitLibraryInfo.sql | UTF-8 | 704 | 3.078125 | 3 | [] | no_license | CREATE PROCEDURE [persons].[GetPersonsUnitLibraryInfo]
@PersonsUnitLibraryInfoID BIGINT = NULL,
@PersonID BIGINT = NULL,
@UnitID BIGINT = NULL
AS
BEGIN
SELECT PersonsUnitLibraryInfoID, PersonID, UnitID, JobTitle, YearsInPosition, WorkEmailAddress, RankID, RankName, IsUnitCommander,
PoliceM... | true |
4197bad3215408c4bcfe52f5be5c8892f3813366 | SQL | Curran123/SQL-Final | /Final Project Stored Procedure 6.sql | UTF-8 | 468 | 3.625 | 4 | [] | no_license | USE Libraries
CREATE PROCEDURE getFIVEBOOKS
AS
BEGIN
SELECT borrower.borrower_name, borrower.borrower_address, COUNT (book_loans.card_no) AS Books_Checked_Out
FROM borrower
INNER JOIN book_loans ON book_loans.card_no = borrower.card_no
INNER JOIN book_copies ON book_copies.book_id = book_loans.book_id
GROUP BY borrowe... | true |
a449a189db0f46fe8dfd314af0779dc5612967d1 | SQL | Ouikka/dbs-2014 | /rendu3/scripts/L.sql | UTF-8 | 750 | 4.90625 | 5 | [] | no_license | -- For each area with more than 10 groups, list the 5 male artists
-- that have recorded the highest number of tracks.
-- areas with more than 10 groups
WITH gareas AS (
SELECT areaid
FROM artists
WHERE type='Group'
GROUP BY areaid
having count(*) > 10 )
-- select artist with max number of tracks
-- ( I did not mana... | true |
424dbafc0f43c27567133d9e58d6ec05d9cce2d4 | SQL | greeca0204/LAN-Behavior_MIS | /config/8-30.sql | UTF-8 | 1,597,709 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : sss
Source Server Version : 50529
Source Host : localhost:3306
Source Database : 8-30
Target Server Type : MYSQL
Target Server Version : 50529
File Encoding : 65001
Date: 2013-09-29 11:23:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... | true |
4838855772e3d68ade58cd5cfd68af7cd3b10dbb | SQL | OHDSI/Achilles | /inst/sql/sql_server/analyses/118.sql | UTF-8 | 561 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | -- 118 Number of observation period records with invalid person_id
select 118 as analysis_id,
cast(null as varchar(255)) as stratum_1, cast(null as varchar(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as stratum_4, cast(null as varchar(255)) as stratum_5,
COUNT_BIG(op1.P... | true |
16f81618229ab42ae195872b8a4dff3789a64b80 | SQL | NWA-trails/NWA-trails-server | /createTableAccountInformation.sql | UTF-8 | 236 | 2.640625 | 3 | [] | no_license | CREATE TABLE "accountInformation"
(
id bigserial NOT NULL,
username text references "users"(username),
dateOfBirth text NULL,
height text NULL,
weight text NULL,
CONSTRAINT user_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
); | true |
27eaafcc4d570f20329f3fd96a8ce238134be9d8 | SQL | liar7710/VegetableShops | /out/artifacts/VegetableShops_war_exploded/WEB-INF/classes/mysql.sql | UTF-8 | 2,050 | 3.84375 | 4 | [] | no_license | create database store;
create user store identified by 'store';
grant all on store.* to store;
use store;
create table users ( #用户表
id int primary key auto_increment,
username varchar(40),
password varchar(100),
nickname varchar(40),
email varchar(100),
sex tinyint defa... | true |
e49baea743d644f4e61536fb617fdfb559c73519 | SQL | phroste/project-2 | /db/schema.sql | UTF-8 | 370 | 3.171875 | 3 | [] | no_license | DROP TABLE IF EXISTS movies;
CREATE TABLE movies (
id SERIAL PRIMARY KEY,
title VARCHAR(255) UNIQUE,
year INTEGER,
imdb VARCHAR(255),
anticipation INTEGER,
poster TEXT
);
DROP TABLE IF EXISTS reviews ;
CREATE TABLE reviews (
id SERIAL PRIMARY KEY,
title VARCHAR(255)
REFERENCES movies(title) ON DELE... | true |
0da1b648b0155fb12026facb02320f2267dbf8d7 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day25/select1044.sql | UTF-8 | 191 | 2.796875 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-24T10:44:00Z' AND timestamp<'2017-11-25T10:44:00Z' AND SENSOR_ID='83aa2d21_cb29_4797_aaa6_8c41ca3d0fc0'
| true |
b7f41b32c8a5cde33890ce537dbd76fd7bb12bba | SQL | vaglarov/Databases-Basics---MS-SQL-Server | /01.Data-Definition-and-Datatypes/Exercises/20 BASIC SELECT.sql | WINDOWS-1252 | 266 | 2.953125 | 3 | [] | no_license | --PROBLE 20
-- Towns - alphabetically by name
-- Departments - alphabetically by name
-- Employees - descending by salary
USE SoftUni
SELECT * FROM Towns
ORDER BY [Name]
SELECT *FROM Departments
ORDER BY [Name]
SELECT * FROM Employees
ORDER BY Salary DESC
| true |
8cbdf51782eb7748d003de6999f10fe4c44d708b | SQL | ANDREA7NEIRA/ORACLE-12C-SQL-Fundamentals | /SQL Fundamentals.sql | UTF-8 | 20,350 | 4.0625 | 4 | [] | no_license | /*
--Clase 1
-- Scrips para la creacion de un usuario en Oracle 12C Pluggable
-- Para poder ejecutar estos scrips se debe ingresar a la base de datos con un usuario SYS o SYSTEM
https://livesql.oracle.com/apex/f?p=590:1000
Practices for Lesson 1: Introduction
In this practice, you start SQL Developer, create a new dat... | true |
28ac892e66210cc57f58448a087006aaf8c8ded4 | SQL | kimhg93/sql | /select/문자형함수.sql | UTF-8 | 1,363 | 3.984375 | 4 | [] | no_license | -- upper
-- 1. 자바 upperCase 보다 DB의 upper() 함수가 훨씬 빠르다
-- 2. 웬만한 DB에서 문자열 처리 뿐만 아니라 포멧팅 처리 등을 다 해주고
-- 자바에서 출력만 해결한다.
-- 3. 자바 코드가 간결해서 좋다.
select upper('SeouL'), ucase('seoul');
select upper(first_name) from employees;
-- lower
select lower('SEoul'), lcase('SEOUL');
-- substring()
select substring('Happy Day', ... | true |
fb62ed6c89a4a14df8602bbdcc262ea17587a0e4 | SQL | DawitZeru/bamazon | /bamazonSchema.sql | UTF-8 | 397 | 3.34375 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon_db;
CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products(
item_id INT NOT NULL,
product_name varchar(100) NULL,
department_name varchar(100) NULL,
price decimal(10, 2) NULL,
stock_quantity INT NULL,
primary key (item_id)
);
alter table pr... | true |
c179b2b3130b08986f6607734841e4d5ce40e755 | SQL | cancerregulome/RegulomeExplorer | /src/dataimport/sql/pathway_schema.sql | UTF-8 | 525 | 2.90625 | 3 | [] | no_license | use random_forest;
create table if not exists pathway_members (psource varchar(50), pname varchar(255), purl varchar(100), pmember varchar(50), primary key(psource, pname, pmember)) ENGINE=MyISAM;
create index pathway_source on pathway_members(psource);
create index pathway_name on pathway_members(pname);
create inde... | true |
8945d7b312d411d36d86cbcc81749e25dc33d8cf | SQL | gxlioper/ecology | /data/Oracle/sql201504141103.sql | UTF-8 | 1,544 | 2.609375 | 3 | [] | no_license | create table cpt_browdef(
fieldid int,
fieldkind int,
iscondition int,
iscondition_type int,
istitle int,
istitle_type int,
userid int,
displayorder decimal(10,2)
)
/
insert into cptDefineField(id,billid,fieldname,fieldlabel,fielddbtype,fieldhtmltype,type,viewtype,detailtable,fromUser,textheight,dsporder,childfieldid... | true |
0a43a18449c01424a8338f5850dec2e7894afd05 | SQL | Anneca/sad_ufs_anne_caroline | /Atividade 7 - 28:09:2016 /Script.sql | UTF-8 | 2,238 | 3.40625 | 3 | [] | no_license |
CREATE TABLE dim_disciplina (
id_disciplina INTEGER NOT NULL,
nome_disciplina VARCHAR NOT NULL,
CONSTRAINT dim_disciplina_pk PRIMARY KEY (id_disciplina)
);
CREATE TABLE dim_horario (
id_horario INTEGER NOT NULL,
descricao_horario VARCHAR... | true |
92d4f708fd1e0facf47bd242f637732df5e42136 | SQL | codemcm/cursoSql | /tables/tables.sql | UTF-8 | 2,167 | 3.640625 | 4 | [] | no_license | /*
* Database name: cloverbd
* Created by: Martin Cruz
* Created date: july 2021
*/
--DROP TABLE useruc
CREATE TABLE useruc(
useruc_id INT IDENTITY(1,1) PRIMARY KEY,
user_name VARCHAR(50),
password VARCHAR(50),
last_access DATETIME,
active BIT DEFAULT 1,
created_by INT,
created_date DATETIME... | true |
e1f6b33d37bb8dd646b56aef466ca6e2e3ba83d3 | SQL | bijalbhavsar/Magento-1.7.0.2 | /scripts/rescue_database.sql | UTF-8 | 442 | 2.53125 | 3 | [] | no_license | /*
* Use this script in case of trying to access admin page and Magento returns a 404 Page not Found page.
*
*/
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admi... | true |
99c84766a8e15bd8db78800407b1b1bd7a068cd9 | SQL | ReneNyffenegger/about-sqlite | /functions/date-time/weekday.sql | UTF-8 | 684 | 2.90625 | 3 | [] | no_license | .mode column
.header on
select
date('2019-09-20', 'weekday 0') next_sunday,
date('2019-09-20', 'weekday 1') next_monday,
date('2019-09-20', 'weekday 2') next_tuesday,
date('2019-09-20', 'weekday 3') next_wednesday,
date('2019-09-20', 'weekday 4') next_thursday,
date('2019-09-20', 'weekday 5') next_... | true |
e2547b3c6808e749b90c8691bdfb3b2f3d9b72c2 | SQL | herokeke/architecture1 | /createSql.sql | UTF-8 | 1,106 | 2.84375 | 3 | [] | no_license | CREATE TABLE tb1_customer
(
pid INT NOT NULL AUTO_INCREMENT,
customerId VARCHAR(100),
pwd VARCHAR(100),
showname VARCHAR(100),
truename VARCHAR(100),
registertime VARCHAR(100),
PRIMARY KEY(pid)
)CHARSET=utf8 ENGINE=INNODB;
CREATE TABLE tb1_goods
(
pid INT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(200),
imgpath VARCHAR(50... | true |
a16605818ac421e9d500a7d3dc49e5ecbf6f1229 | SQL | scchethu/women_safety | /women_safty/women_safety.sql | UTF-8 | 2,371 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 07, 2020 at 07:57 AM
-- Server version: 5.6.11
-- PHP Version: 5.5.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
e956925a56060d928c7acfd27584878bf8d0092c | SQL | theriex/rh | /ref/port/createMySQLTables.sql | UTF-8 | 3,159 | 2.671875 | 3 | [] | no_license | CREATE TABLE AppUser ( -- PastKey User account
dsId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,
created VARCHAR(256) NOT NULL,
modified VARCHAR(256) NOT NULL,
batchconv VARCHAR(256),
importid BIGINT UNIQUE,
email VARCHAR(256) NOT NULL UNIQUE,
phash VARCHAR(256) NOT NULL,
status VARCHAR(256),
acts... | true |
e7e600d302e25913d2234fd824201e7f57448235 | SQL | teaspring/problems | /leetcode/sql/department_with_employee.sql | UTF-8 | 697 | 4.1875 | 4 | [] | no_license | /*
* Apr 2022, XXX interview, SQL question
* given employee table, with columns name, id, dept_id, salary; department table, with columns id, name, location.
* ask to list the department and its employee numbers, including the department without employee
*/
/*
* NOTE:
1. among the output, if count(*), the department... | true |
40e60c5f2e1d121c5737c945bf94d9a7ae750a9e | SQL | jingoon/JavaHome | /Ezen201123/bin/YesterDay.sql | UTF-8 | 233 | 2.8125 | 3 | [] | no_license | create table member(
id varchar2(6),
name varchar2(15),
job varchar2(2),
birth date
)
insert into MEMBER values ('m001', 'kim','a','2000-12-25')
alter table member add constraint pk_member_id primary key(id)
select * from MEMBER
| true |
3a0eee3983c887dd6dd2307eddceb347ef7ae079 | SQL | aPureBase/kwery | /example/src/main/resources/schema.sql | UTF-8 | 1,191 | 3.6875 | 4 | [
"MIT"
] | permissive | create table actor (
id integer identity,
first_name varchar(255) not null,
last_name varchar(255) null,
version integer not null
);
create table language (
id integer identity,
name varchar(255) not null,
version integer not null,
constraint language_name_idx unique (name... | true |
2a80f450f8f4064baa03b9f7964c3c88594646fc | SQL | chelseaisgood/ADBHomework2 | /Q1/MySQL/p2/MySQL_p2.sql | UTF-8 | 1,128 | 4 | 4 | [] | no_license | drop table if exists temp;
drop table if exists temp1;
drop table if exists temp2;
drop table if exists final_result;
create table temp as (select * from stock where stocktime <= 200000 order by stocksymbol asc, stocktime asc);
set @row = 0;
#create table temp1 as (select (@row:=@row + 1) as num, stocksymbol, quantit... | true |
0d71a6dc99e579a44b8e969ae30b4beb363a22d9 | SQL | Rendanic/SQL-Zauberkasten | /sql/pdb/list_save_state.sql | UTF-8 | 291 | 2.578125 | 3 | [] | no_license | --
-- Thorsten Bruhns (Thorsten.Bruhns@opitz-consulting.de)
--
-- Version: 1
-- Date : 12.05.2018
--
-- list save state for PDBs
--
set pages 100 lines 120
column con_name format a60
column state format a10
column restricted format a12
select con_name
,state
,restricted
from CDB_PDB_SAVED_STATES
order ... | true |
4f025d174b1723ba7ffc704ea9c44f832daced28 | SQL | jegyeong/Oracle | /20191216/20200120(2).sql | UHC | 2,396 | 3.84375 | 4 | [] | no_license | 2020-01-20 02)subqery DML(insert, update, delete)
)μ(parent_id) 90 μ(60,70,100,110) ձ Ͽ μ ä ձ Ͻÿ
1)μ(parent_id) 90 μ ձ
select department_id,
avg(salary)
from employees a
where a.department_id in ()
group by a.department_id
() μ(parent_id) 90 μ
select d... | true |
9e0ef2e3d99da660fa52152dad1a253f89d06991 | SQL | gurpreet19/ec198392_wht | /Database/configuration/03_02_headless_tool/Delta_WST/TargetTriggerDefinitions/IU_WBI_SAMPLE.sql | UTF-8 | 1,687 | 3.3125 | 3 | [] | no_license | CREATE OR REPLACE TRIGGER "IU_WBI_SAMPLE"
BEFORE INSERT OR UPDATE ON WBI_SAMPLE
FOR EACH ROW
DECLARE
CURSOR c_get_well(cp_wbi_object_id VARCHAR2) IS
SELECT w.object_id
FROM webo_interval wbi, webo_bore wb, well w
WHERE wbi.well_bore_id = wb.object_id AND wb.well_id = w.object_id AND
wbi.o... | true |
14fbb0c41f7b83b1a4d85816bd8db08edae1c175 | SQL | jessicazhang601/SQL | /FriendRequest1.sql | UTF-8 | 2,586 | 4.5625 | 5 | [] | no_license | /*
In social network like Facebook or Twitter, people send friend requests and accept others’ requests as well. Now given two tables as below:
Table: friend_request
| sender_id | send_to_id |request_date|
|-----------|------------|------------|
| 1 | 2 | 2016_06-01 |
| 1 | 3 | 2016_06-... | true |
c4147881b121045c4ac12faba39ebfd7daa90f44 | SQL | SrPadilha1/site | /ibicss.sql | UTF-8 | 7,227 | 2.78125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.7
-- Dumped by pg_dump version 9.5.7
-- Started on 2018-11-26 20:13:13 BRST
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_mess... | true |
8bd7d45b62c4473a71c49186ecc85401a08aafae | SQL | nlimon93/QA | /resources/database-install-scripts/attendancescript.sql | UTF-8 | 2,967 | 4.375 | 4 | [] | no_license | /*
The purpose of this script is to connect to the existing database
and create tables for Courses, Course_Attendees, and
*/
CREATE TABLE IF NOT EXISTS qaproject.Courses(
course_id int NOT NULL AUTO_INCREMENT,
course_name varchar(62) NOT NULL,
course_subject varchar(5),
course_number... | true |
e6bafd90a33de5f25f3fd6d9b405371b577e1e87 | SQL | kits-3/personal | /Project/08.NguyenToTheToan/08.ToanDB.sql | UTF-8 | 5,272 | 2.875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.5.4-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.0.0.5919
-- -------------------------------------------... | true |
a7ffc822aa0c07c6971e12ac5fcb2f057732b9bd | SQL | pdantoni/DdS-1erParcial | /database/cliente.sql | UTF-8 | 1,971 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-08-2021 a las 02:17:46
-- Versión del servidor: 10.4.19-MariaDB
-- Versión de PHP: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
c9dd32ed4bb1aeef6e93a00090b09561bce52e53 | SQL | christosperis/codehub-guide-film-repository | /src/main/resources/db/migration/V1_1__init_structure.sql | UTF-8 | 977 | 3.234375 | 3 | [] | no_license | create sequence if not exists actor_seq start with 1001 increment by 1;
create sequence if not exists category_seq start with 1001 increment by 1;
create sequence if not exists language_seq start with 1001 increment by 1;
create sequence if not exists film_seq start with 1001 increment by 1;
create table actor (
id b... | true |
73df52d7589030e327716cde945a6efff6c92c6f | SQL | afhfjh/enteco | /SQL/Aplicaciones/AnalEsta/Vistas/ANE_M_PRO_MATERIAL.sql | ISO-8859-1 | 24,265 | 2.703125 | 3 | [] | no_license | SELECT * FROM ANALESTA.ANE_M_PRO_REAL_C WHERE EMPRESA = '05' AND OT = '2015000686' ORDER BY FASE_MP;
SELECT * FROM ANALESTA.ANE_M_PRO WHERE EMPRESA = '05' AND OT = '2015000686' ORDER BY FASE_MP;
SELECT * FROM ANALESTA.ANE_M_PRO_REAL_C WHERE ML_PRODUCIDOS_REALES = 0;
SELECT * FROM ANALESTA.ANE_M_PRO_REAL_C WHERE TIPO_... | true |
d682ad857ca843c8fdf65688f0036d37a5d1c1ff | SQL | gudeck/basis-banco-sgp | /bd/006_avaliacao.sql | UTF-8 | 354 | 2.671875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS AVALIACAO
(
ID INT NOT NULL AUTO_INCREMENT,
DATA_AVALIACAO DATE NOT NULL,
APROVEITAMENTO INT NOT NULL,
ID_CANDIDATO INT NOT NULL,
ID_PROVA INT NOT NULL,
PRIMARY KEY (ID),
FOREIGN KEY (ID_CANDIDATO) REFERENCES CANDIDATO (ID),
FOREIGN KEY ... | true |
ae1a33cc1bdcf327b238a4542f38ae57f725524a | SQL | erdincay/fleXive | /src/framework/storages/MySQL/resources/config/0100_flexive_config.sql | UTF-8 | 829 | 2.703125 | 3 | [] | no_license | -- Main configuration table
CREATE TABLE FXS_CONFIGURATION (
CPATH VARCHAR(255) NOT NULL,
CKEY VARCHAR(255) CHARACTER SET UTF8 NOT NULL,
CVALUE LONGTEXT charset utf8,
PRIMARY KEY UK_CONFIGURATION(CPATH, CKEY)
)
ENGINE = InnoDB
charset = latin1
COMMENT = 'Global [fleXive] configuration table';
INSERT INTO FX... | true |
683a22e41e0dd443ba3aec821e6f1da8b38e6520 | SQL | lgalhoz/AS400-Framework | /qsqlsrc/stst001.sql | UTF-8 | 189 | 2.90625 | 3 | [] | no_license | EXEC SQL
DECLARE C1 CURSOR FOR
SELECT MAX(CDINDICE) FROM FTBLP010
FOR FETCH ONLY;
EXEC SQL OPEN C1;
EXEC SQL CLOSE C1;
| true |
b05e0b68b73734b96d3ad4685f7c52d861638318 | SQL | karthik0101/PHP | /crud/record.sql | UTF-8 | 1,628 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 14, 2018 at 08:57 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
9d5b2c58da2c7812482a5739d0f46310baecf333 | SQL | Forest-Newark/Teacher-Talk | /teachertalk.sql | UTF-8 | 6,276 | 2.890625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 9.6.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min... | true |
b1312f868b70ccb01af6182d56066a6ca59459b0 | SQL | jishnujithkk/online-library-php-mysql-html-css | /lms.sql | UTF-8 | 6,196 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Sep 28, 2019 at 09:59 AM
-- Server version: 5.7.26
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
9d985f23bdc56cbc41aa8c66ae923c698828fc1c | SQL | squeakus/bitsandbytes | /PHP/panorama/db/answers.sql | UTF-8 | 380 | 2.609375 | 3 | [] | no_license | -- --------------------------------------------------------
--
-- Table structure for table `answers`
--
CREATE TABLE `answers` (
`ID` int(10) unsigned NOT NULL auto_increment,
`UID` int(10) unsigned NOT NULL default '0',
`QID` int(10) unsigned NOT NULL default '0',
`AID` int(10) unsigned NOT NULL default '... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.