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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b04774ffcf24398ecc55ed0409e2c71ee4c7df58 | SQL | ParaschivAlex/FMI-Thangs | /PLSQL/Lab3.sql | UTF-8 | 513 | 2.984375 | 3 | [
"MIT"
] | permissive | --12 a
select '01' as day, count(*)
from rental
where to_char(book_date, 'mm yyyy')=to_char(sysdate, 'mm yyyy') and to_char(book_date, 'dd')='01'
UNION
select '02' as day, count(*)
from rental
where to_char(book_date, 'mm yyyy')=to_char(sysdate, 'mm yyyy') and to_char(book_date, 'dd')='02';
--var 2
selec... | true |
4804231502eaff20b812cba74924463e46c57d2c | SQL | bkovch/TechAssessment | /sql/best product & marketing.sql | UTF-8 | 1,046 | 4.625 | 5 | [] | no_license | use lull;
# the best-selling product and most successful marketing source in the month of January 2021
with orders_filtered as (
# orders filtered by year & month in one place to reuse multiple times below
select
id,
product_id,
product_quantity
from orders
where year(ordered_at... | true |
78b7c33c4032471646a22600953f9e5c0d23ae31 | SQL | yypnogg1011/16_daoyun | /daoyun.sql | UTF-8 | 12,200 | 3.5 | 4 | [] | no_license | /*==============================================================*/
/* DBMS name: Sybase SQL Anywhere 12 */
/* Created on: 2020/3/27 17:04:43 */
/*==============================================================*/
if exists(select 1 from sys.sysforeignkey wh... | true |
fdc83eedafad238c6b0478483da0ac488105a87c | SQL | wenjuweng37/Oracle_DB_Perf_Check | /oracle_db_perf_check.sql | UTF-8 | 21,977 | 3.546875 | 4 | [] | no_license |
spool db_chk1.csv
set PAGESIZE 50000
show parameter sga
show parameter pga
column stat_name format a60
Prompt "OS Statistics"
select stat_name, value from v$osstat;
prompt "check compression:"
select compress_for, count(1) from dba_tables where owner <>'SYS'
and trim(compress_for) is ... | true |
305a0aaa4ab0a59d5a5eef66f6253e514bd15fdf | SQL | onpica15/MMMH59_sennheiser75 | /data/sennheiser75.sql | UTF-8 | 20,419 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2020-12-16 10:23:22
-- 伺服器版本: 10.4.14-MariaDB
-- PHP 版本: 7.3.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
4b20f623c96bbd00a32a53cb931e0c8c2cd138ad | SQL | mademet/DAwSQL | /SampleSalesDB/SQL_JOINS_1.sql | UTF-8 | 1,445 | 4.3125 | 4 | [] | no_license | SELECT P.product_name, C.category_name
FROM product.product P
INNER JOIN product.category C ON P.category_id = C.category_id
;
-- List employees of stores with their store inf.
SELECT first_name, last_name, store_name
FROM sale.staff STF
INNER JOIN sale.store AS ST ON STF.store_id = ST.store_id
;
-- Write a query th... | true |
25ed481aecbaea980946acfa161bed832d1efaaa | SQL | zhuxuanying/myDemo | /vue-spider/spider.sql | UTF-8 | 29,356 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 2018-11-01 13:11:29
-- 服务器版本: 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 @OLD_CHARACTER_SE... | true |
6f1c08d7ae73c5b5d9d16d4927d1a7fb5eeaf7d7 | SQL | jacqueshovine/TOP_SQL | /select_from_nobel.sql | UTF-8 | 2,253 | 3.71875 | 4 | [] | no_license | ---------------------------------------------------------------- 1
SELECT yr, subject, winner
FROM nobel
WHERE yr = 1950
---------------------------------------------------------------- 2
SELECT winner
FROM nobel
WHERE yr = 1962
AND subject = 'Literature'
----------------------------------------------------------------... | true |
7f30e02ae91e18baeddb572af96d823979296804 | SQL | binhnguyen136/SPStore | /db_phoneshop.sql | UTF-8 | 25,540 | 3.890625 | 4 | [
"MIT"
] | permissive | -- Adminer 4.3.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DELIMITER ;;
DROP PROCEDURE IF EXISTS `admin_cate_parent_list`;;
CREATE PROCEDURE `admin_cate_parent_list`()
BEGIN
SELECT cate.ordinal AS cate_ordinal,
... | true |
2380438f40f6b9f3596b06267ab62ca352ca686a | SQL | MrD0079/portal | /sql/merch_photo_report_new.sql | UTF-8 | 2,294 | 3.125 | 3 | [] | no_license | /* Formatted on 19.03.2014 8:59:39 (QP5 v5.227.12220.39724) */
SELECT cpp1_tz_oblast tz_oblast,
n_net_name net_name,
cpp1_ur_tz_name ur_tz_name,
cpp1_tz_address tz_address,
rb_kodtp kodtp,
ra_name ag_name,
rb_ag_id ag_id,
TO_CHAR (c.data, 'dd.mm.yyyy') dt... | true |
d2ead7e80ae85c36b7372eff0d6e57757ad7bd72 | SQL | Closer94/University_Datas | /Junior/3학년 2학기/데이터베이스/실습자료/10주차/week10.sql | UHC | 1,855 | 3.5625 | 4 | [] | no_license | insert into department
(dno, dname, loc)
values(50, '', 'ϻ')
select *
from department
select *
into department2
from department where 0=1
insert into department2
select top(3) *
from department
select *
from department2
select *
into employee01
from employee
select *
from employee01
update employee01
set dno ... | true |
7ff502044e7f0428c438a1eb2a4492df324a999f | SQL | rachaelbaumann/SSMS_Student_Files | /Demo Files/Chapter 05 Aggregates/Inline Samples/Inline Samples 05.sql | UTF-8 | 2,520 | 4.3125 | 4 | [] | no_license | USE RetailBankingSample;
--COUNT and COUNT_BIG
SELECT COUNT(*) AS CountAllRows
, COUNT(C.MiddleName) AS CountPopulatedMiddleNames
FROM Customer AS C
;
--not displayed in book - alternate query discussed
SELECT COUNT(*) AS NULLMiddleNames
FROM Customer AS C
WHERE C.MiddleName IS NOT NULL
;
SELECT COUNT(*) AS NULLMid... | true |
df433d49714817d0881e30271708029bb6e296c3 | SQL | diya20222/turkcemeslekler | /meslekler.sql | UTF-8 | 32,661 | 2.796875 | 3 | [
"MIT"
] | permissive | CREATE TABLE `meslekler` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`meslek` varchar(70) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `meslekler` (`id`, `meslek`)
VALUES
(1,'Acentacı'),
(2,'Acente'),
(3,'Acil Durum Yönetmeni'),
(4,'Acil Tıp Teknisyeni'),
(5... | true |
3f594716cfec0ec3a2df635a71d20a452d92367a | SQL | bilwifi/tfc-contr-le-des-documents-pedagogiques | /backups/databaseSeed.sql | UTF-8 | 3,542 | 3.328125 | 3 | [] | no_license |
---
--- NE MODIFIER QUE LE NomConseiller,PostNomConseiller, PreNomConseiller
---
INSERT INTO `professeurs` (`idprofesseurs`, `idsecope`, `nom`, `postnom`, `prenom`, `qualification`, `attribution`, `anciennete`, `pseudo`, `password`, `user_role`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, '000000', 'NomC... | true |
5914948def9c1794c15b7d5cff979031eb233716 | SQL | yennanliu/CS_basics | /leetcode_SQL/rank-scores.sql | UTF-8 | 2,328 | 4.625 | 5 | [] | no_license |
# rank-scores
# https://leetcode.com/problems/rank-scores/description/
/*
Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value. In other words, there should be no "holes"... | true |
522774d78c31741f51289cb5607c1fa9b07c15bf | SQL | Swoco/swoco | /swoco/database/swoco_coin (4).sql | UTF-8 | 24,000 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 14, 2018 at 09:03 AM
-- Server version: 5.6.41-84.1-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
9ef1c4ba6af3e8f5c9d10b53081bed126b9c7854 | SQL | fuerbringer/SkipTheBS-Server | /_install/3_insert_base_data.sql | UTF-8 | 1,134 | 3.046875 | 3 | [] | no_license | /* Insert YouTube as video platform. More could technically be added. */
INSERT INTO `skipthebs`.`video_platform` (`id`, `name`, `video_code_prefix`, `domain`) VALUES ('1', 'YouTube', 'youtube.com/watch?v=', 'youtube.com');
/* Insert a video: using one of LTTs videos. Perfect for testing purposes since his videos are ... | true |
3934527f7405b6bfa5136dbacb8573c659868bb7 | SQL | Chewieez/Bangazon-Command-Line-Application | /report.sql | UTF-8 | 413 | 4.3125 | 4 | [] | no_license | select
op.id as "Order Number",
c.name as "Customer Name",
c.id as "Id",
p.name as "Product",
p.quantity as "Quantity",
p.price as "Price",
SUM(p.quantity*p.price) as "Total Revenue Per Product"
from
OrderProduct op,
Customer c,
Product p,
`Order` o
where c.id = p.CustomerId
and p.id == op.ProductI... | true |
da36e8394c50f0feadcb4362b89ad7d101fc6d1e | SQL | Freelix/Library | /Utils/database/biblio.sql | UTF-8 | 5,513 | 3.125 | 3 | [] | no_license | -- Généré le : Sam 12 Septembre 2015
-- Version du serveur : 5.6.17
-- Version de PHP : 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 */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_C... | true |
309725260c603863bd0c66d9270f7653fe14fd67 | SQL | barby540/Friendships | /amigos data.sql | UTF-8 | 5,557 | 3.265625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: friends
-- ------------------------------------------------------
-- Server version 5.7.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
89d9643743c2efcba4add9d27d18e5da3a3a365a | SQL | tanu17/University-Database-System | /SQLQueryAppendix.sql | UTF-8 | 2,309 | 4.09375 | 4 | [] | no_license | -------------1)
SELECT Person.person_name, Stakeholder.person_id
from Person,Stakeholder
where Person.person_id=Stakeholder.person_id AND Stakeholder.domain='Public'
-------------2)
Select Person.person_id, Person.person_name from Person
where Person.person_id IN (SELECT Person.person_id
from Person, Stakeholder, ... | true |
f79ce2d30681f6824aed210fecac129d79d678b4 | SQL | matthewrpotter75/FantasyPremierLeagueDB | /FantasyPremierLeagueDW/dbo/Stored Procedures/GetTeamDifficultyAndPositionGameweekHistoryStatsByDifficultyWasHome.sql | UTF-8 | 1,915 | 4.3125 | 4 | [] | no_license | CREATE PROCEDURE dbo.GetTeamDifficultyAndPositionGameweekHistoryStatsByDifficultyWasHome
(
@TeamDifficulty INT = NULL,
@PlayerPositionKey VARCHAR(50) = NULL,
@TeamShortName VARCHAR(3) = NULL,
@SeasonKey INT = 12,
@MinutesLimit INT = 30
)
AS
BEGIN
SELECT PlayerPositionShort AS PlayerPosition
FROM dbo.DimPlayerP... | true |
dc7b3447620a4a8e7f115e1ef9326e9db1c3cb34 | SQL | kkadalip/Java-proov-2H | /Old/schema.sql | UTF-8 | 503 | 3.875 | 4 | [] | no_license | CREATE TABLE user (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(45) NOT NULL
);
CREATE TABLE sector (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(45) NOT NULL,
parent_sector_id INTEGER,
FOREIGN KEY (parent_sector_id)
REFERENCES sector ON DELETE RESTRICT
);
CREATE TABLE user_sector (
user_id... | true |
a7a433bc08bc63d16686a3d28d8f21a473249b42 | SQL | facebookincubator/CG-SQL | /sources/lua_demo/t1.sql | UTF-8 | 2,319 | 3.6875 | 4 | [
"MIT"
] | permissive | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
create table foo(x integer);
declare proc printf no check;
create proc foo()
begin
let z := case when 5 then 3 else 7 end;
... | true |
0308a144906d49b79723765c7edb0f4d60921158 | SQL | Beyzakllcc/KampIntro | /SQLQuery2.sql | UTF-8 | 1,593 | 3.953125 | 4 | [] | no_license | --Select
--ANSII
Select ContactName Adi, CompanyName Sirketadi, City Sehir from Customers
Select * from Customers where City = 'Berlin'
--case sensitive
Select * from Products where CategoryID = 1 or CategoryID = 3
Select * from Products where CategoryID = 1 and UnitPrice >= 10
Select * from Products order by Produ... | true |
34ce93823f5a0fe12f25ad4ab700cc361ec10c06 | SQL | arunfoto/cma | /db.sql | UTF-8 | 694 | 3.421875 | 3 | [
"BSD-3-Clause"
] | permissive | --
-- Table structure for table `homes`
--
CREATE TABLE `homes` (
`id` int(11) NOT NULL,
`firstname` varchar(250) NOT NULL,
`lastname` varchar(250) NOT NULL,
`email` varchar(250) NOT NULL,
`phone` varchar(15) NOT NULL,
`address` text NOT NULL,
`home_sqft` int(11) NOT NULL,
`form_submit` int(11) NOT NUL... | true |
9185311b2e400e4746038ddc4e2c0b1b536ed8dd | SQL | rockinrocco/araDatabase | /makeRecipeProc.sql | UTF-8 | 313 | 2.6875 | 3 | [
"MIT"
] | permissive | CREATE DEFINER=`root`@`localhost` PROCEDURE `createPost`(IN `inRecipeName` VARCHAR(255), IN `inPostBody` TEXT)
BEGIN
DECLARE result VARCHAR(255);
INSERT
INTO recipe (description, name, username)
VALUES (inPostBody, inRecipeName,'user');
SET result = 'Recipe created!';
SELECT result;
END | true |
42b2ad776e8d6301ce36ce2afdc3561db639c260 | SQL | Wang-Yann/LeetCodeMe | /MySQL/1141_user-activity-for-the-past-30-days-i.sql | UTF-8 | 2,487 | 3.71875 | 4 | [] | no_license | -- @Author : Rock Wayne
-- @Created : 2020-08-03 20:48:12
-- @Last Modified : 2020-08-03 20:48:12
--
-- #活动记录表:Activity
-- #
-- # +---------------+---------+
-- #| Column Name | Type |
-- #+---------------+---------+
-- #| user_id | int |
-- #| session_id | int |
-- #| activity_date |... | true |
e24bfc14b59084719b32cb6510de390929713b60 | SQL | wf-oadenaike/TestProject | /TestDBProject/Access.ManyWho/Views/WhistleblowingReadOnlyVw.sql | UTF-8 | 785 | 3.21875 | 3 | [] | no_license |
CREATE VIEW [Access.ManyWho].[WhistleblowingReadOnlyVw]
AS
SELECT wb.WhistleblowingId
, wb.RaisedByPersonId
, rp.PersonsName as RaisedBy
, wb.RaisedDate
, wb.ReviewedByPersonId
, rep.PersonsName as ReviewedBy
, wb.ReviewedDate
, wb.Summary
, wb.Comments
... | true |
0102ee8650d1d0099136c6951212e2355b16a6f8 | SQL | SkiMsyk/sql_instructions | /source/chap07/sample/materials2.sql | UTF-8 | 179 | 2.515625 | 3 | [] | no_license | select
center
,case
when count(material) <> count(distinct material) then 'duplicated'
else 'no-problem'
end as status
from Materials
group by center
; | true |
0c82b382718a23f56df043c1b8e894953674a5f2 | SQL | eamt/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/100-not_my_genres.sql | UTF-8 | 540 | 4.03125 | 4 | [] | no_license | -- Lists all genres not linked tothe show `Dexter`.
SELECT DISTINCT tv_genres.name
FROM tv_shows
JOIN tv_show_genres
ON tv_shows.id = tv_show_genres.show_id
JOIN tv_genres
ON tv_show_genres.genre_id = tv_genres.id
WHERE tv_genres.name NOT IN (
SELECT tv_genres.name
FROM tv_shows
... | true |
8baac93782795036d0598223956fde5d50dc7e5f | SQL | opengauss-mirror/openGauss-server | /src/test/regress/sql/cstore_unique_index.sql | UTF-8 | 5,708 | 4.28125 | 4 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"curl",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"CC-BY-4.0",
... | permissive | drop table if exists t0;
drop table if exists t1;
drop table if exists part_t1;
-- Row table t0 is used for cstore insertion.
create table t0 (a int, b int, c int, d int);
insert into t0 values (generate_series(1, 800, 1), generate_series(1, 800, 1), generate_series(1, 800, 1), generate_series(1, 800, 1));
create tab... | true |
e68ddcd725af36503f30c566864200fc28a42702 | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/02481_analyzer_optimize_grouping_sets_keys.sql | UTF-8 | 924 | 2.953125 | 3 | [
"BSL-1.0",
"Apache-2.0"
] | permissive | set allow_experimental_analyzer = 1;
EXPLAIN QUERY TREE run_passes=1
SELECT avg(log(2) * number) AS k FROM numbers(10000000)
GROUP BY GROUPING SETS (((number % 2) * (number % 3)), number % 3, number % 2)
HAVING avg(log(2) * number) > 3465735.3
ORDER BY k;
EXPLAIN QUERY TREE run_passes=1
SELECT avg(log(2) * number) AS... | true |
6a5a49e73e3a18f71edde90c0c55bde49c688f4c | SQL | ccweerasinghe1994/mysql | /12.selfJoin.sql | UTF-8 | 122 | 2.84375 | 3 | [] | no_license |
SELECT a.reference, b.ota_reservation_id
FROM bookings b
JOIN bookings a ON a.reference = b.ota_reservation_id; | true |
ff4c945b960f27ce22093c7e7969ea4836ad028e | SQL | lrama1/VASBootBuilder | /VASBootBuilder/src/vasbootbuilder/resources/other/schema-template.sql | UTF-8 | 746 | 2.75 | 3 | [] | no_license | #set($domainVar = $domainClassName.substring(0,1).toLowerCase() + $domainClassName.substring(1))
CREATE TABLE ${domainVar} (
#foreach($key in $attrs.keySet() )
#set($columnName = "")
#set($datatype = "")
#if(${prepForHSQL} == true)
#set($columnName = $oracleNames.get(${key}))
#else
#set($c... | true |
3a2b74adef9d9caf992225b65a859672b5ed6bd5 | SQL | safizaidi98/Table-Partitioning-Sliding-Partitioning | /script.sql | UTF-8 | 740 | 3.296875 | 3 | [] | no_license |
use WideWorldImportersDW
select * from [Dimension].[Customer]
select
Customer,
count(Customer)
from [Dimension].[Customer]
group by
Customer
select * from Dimension.City
-------------------------------------- ROWSTORE NonCluster INDEX------------------------------------
create nonClustered index IX_Provin... | true |
b4ed3b58bb5bc6f61c72d2de74def50475930d80 | SQL | viniciusmattosrj/php-pdo | /database/scheme/php_pdo.sql | UTF-8 | 832 | 3.453125 | 3 | [
"MIT"
] | permissive | --Criando database
CREATE DATABASE curso_pdo;
--Criação tabela
CREATE TABLE users(
id int(11) auto_increment PRIMARY KEY,
name varchar(50) not null,
email varchar(50) unique key not null,
password varchar(150) null,
created_at timestamp default current_timestamp
);
--Exibindo a estrutura da tabela... | true |
2f17b21a33429af21df29fb7a38b0b853a13823c | SQL | btsmith2007/bt1121 | /sql-files/sql_data.sql | UTF-8 | 8,124 | 2.765625 | 3 | [] | no_license |
CREATE TABLE `acos` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`parent_id` int(10) DEFAULT NULL,
`model` varchar(255) DEFAULT NULL,
`foreign_key` int(10) DEFAULT NULL,
`alias` varchar(255) DEFAULT NULL,
`lft` int(10) DEFAULT NULL,
`rght` int(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CH... | true |
81aeaec9a5f360b896f739199a715e3b12828509 | SQL | Nemens1s/cinep | /src/test/resources/create-data.sql | UTF-8 | 4,239 | 3.765625 | 4 | [] | no_license | DROP TABLE IF EXISTS USER_BOOKMARKS;
DROP TABLE IF EXISTS MOVIES CASCADE;
DROP TABLE IF EXISTS USERS CASCADE ;
DROP TABLE IF EXISTS GENRES CASCADE ;
CREATE TABLE USERS
(
id LONG AUTO_INCREMENT PRIMARY KEY,
password varchar(250) not null,
role varchar(250) not null,
username VARCHAR(250) not ... | true |
eef0af9dcbbd24d0e5baff316a1f776158c62e1b | SQL | siddhartha-Infy01/my-ref-code | /dbscripts/PRC/findAllLocationsByWidget.sql | UTF-8 | 1,116 | 3.796875 | 4 | [] | no_license | drop procedure findAllLocationsByWidget;
delimiter $$
CREATE PROCEDURE findAllLocationsByWidget(usrid VARCHAR(25),widgetid VARCHAR(25))
BEGIN
declare loclist varchar(1000);
select location_list into loclist from user_widget_settings where user_id=usrid and widget_id=widgetid;
SET @vars = loclist;
SET @vars := CONCAT(... | true |
bc49691a489528b4eb568cf76a5948b750e6bb84 | SQL | GoBlueCats/EECS484-DataBase-Design | /project_code/project4/dvd_store_data/pgsqlds2_create_tbl.sql | UTF-8 | 3,615 | 3.34375 | 3 | [] | no_license |
-- pgsqlds2_create_db.sql: DVD Store Database Version 2.1 Build Script - Postgres version
-- Copyright (C) 2011 Vmware, Inc.
-- Last updated 2/13/11
-- Tables
CREATE TABLE CUSTOMERS
(
CUSTOMERID SERIAL PRIMARY KEY,
FIRSTNAME VARCHAR(50) NOT NULL,
LASTNAME VARCHAR(50) NOT NULL,
ADDRESS1 VARCHAR(50) NOT N... | true |
2431a07ce5e0afb29149bf641bc49fd840390697 | SQL | ProjetSID2018/Groupe2_BD_Index | /sql/PROCEDURES ARCHIVE/procedure V2/UPDATE_POSITION_WORD.sql | UTF-8 | 2,092 | 3.296875 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS PPOSITION_WORD;
DELIMITER |
CREATE PROCEDURE UPDATE_POSITION_WORD (IN VID_POSITION INT,IN VPOSITION INT, IN VTITLE BOOLEAN, IN VWORD VARCHAR(50), VTYPE_ENTITY VARCHAR(25), IN VPOS_TAG VARCHAR(25), IN VID_ARTICLE INT,IN VFILE_WIKI VARCHAR(255),IN VSYNONYM VARCHAR(50))
BEGIN
DECLARE VID_WORD I... | true |
511e3b8554dcdb2ccf3bb1d5ae7c99527451c223 | SQL | Loulansu/Exam | /exam.sql | UTF-8 | 3,311 | 3.78125 | 4 | [] | no_license | create database exam default character set utf8 collate utf8_bin;
use exam;
create table if not exists queType(
tid int primary key auto_increment,
tname varchar(20) not null unique
)ENGINE=InnoDB AUTO_INCREMENT=101 default charset=utf8 collate=utf8_bin;
create table if not exists difficulty(
lid int primary key... | true |
450eaafd128011a1b2987fb8a76ed18235efad48 | SQL | apolonia4/SQL-Server-Scripts | /miscqueries.sql | UTF-8 | 509 | 3.4375 | 3 | [] | no_license | select * from download
where description like '%wal-mart%'
update download
set BusinessName = 'MARTINS'
, Type = 'Grocery'
where description like '%martin''s%'
select sum(amount) from download
where BusinessName = 'subway'
select sum(amount) from download
where type = 'gas' OR type = 'Restaurant'
... | true |
254b1d863748c4435c14c329a8d25bb3d6d61952 | SQL | 2ndQuadrant/array_textsort | /array_textsort--1.1.sql | UTF-8 | 456 | 2.734375 | 3 | [
"BSD-2-Clause"
] | permissive | -- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION array_textsort" to load this file. \quit
-- array_textsort() sorts textual arrays
CREATE FUNCTION array_textsort(_text)
RETURNS _text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
-- array_distinct() sorts textu... | true |
21d0faa9501c6e867f7a78b2adbbf9c44ad1bc46 | SQL | ibm-ecm/ibm-content-manager | /samples/server/exit/icmaclxt_plsql.sql | UTF-8 | 4,460 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | -- ###########################################################################
-- #DISCLAIMER OF WARRANTIES.
-- #The following IBM Content Manager Enterprise Edition code is sample code
-- #created by IBM Corporation.IBM grants you a nonexclusive copyright license
-- #to use this sample code example to generate sim... | true |
6d6b6d29d91222f03381b22ebe2126f6bb3ff593 | SQL | mjgw/smartest-import-test | /System/Install/SqlScripts/table_setup.sql | UTF-8 | 31,707 | 3.125 | 3 | [] | no_license | -- Smartest Table Setup, Schema version 22
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
-- Table structure for table `AssetClasses`
--
CREATE TABLE `AssetClasses` (
`assetclass_id` int(9) NOT NULL AUTO_INCREMENT,
`assetclass_name` varchar(32) NOT NULL DEFA... | true |
86d148dba5c4c3b610729449707710277890b85a | SQL | DurkoMatko/Master_Thesis | /databaseScripts/schemaCreation.sql | UTF-8 | 1,971 | 3.3125 | 3 | [] | no_license | CREATE SCHEMA `oss_issues` ;
CREATE TABLE `oss_issues`.`issues` (
`id` INT NOT NULL,
`title` VARCHAR(450) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL,
`number` INT NULL,
`created` DATE NULL,
`closed` DATE NULL,
`description` VARCHAR(450) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL,
`labels` VARCH... | true |
589b0279926f5e5cebdc5f595203e228efd9b7fe | SQL | NickyMateev/FMI-RDBMS | /Practicum/Facebook(project)/creation/createProcFB.sql | UTF-8 | 1,572 | 3.703125 | 4 | [] | no_license | SET SCHEMA FN000@
CREATE PROCEDURE FN000.FACEBOOK_USER_INFO_SP
(IN USER_ID_PARAM INTEGER)
RESULT SETS 3
BEGIN
DECLARE C1 CURSOR WITH RETURN TO CLIENT FOR
SELECT *
FROM FN000.USERS AS U
WHERE U.USER_ID = USER_ID_PARAM;
DECLARE C2 CURSOR WITH RETURN TO CLIENT FOR
SELECT *
FROM FN000.POSTS AS P
... | true |
d9b62ba118e4d7abb558b8ebbb814920ad924b0f | SQL | starbuck93/14F_CS374_Team2 | /database-inserts/testdb/building.sql | UTF-8 | 253 | 2.8125 | 3 | [] | no_license | drop table if exists test.building;
create table test.building(id INT PRIMARY KEY, name VARCHAR(30), abbrv VARCHAR(5) );
INSERT INTO test.building (id, name, abbrv) VALUES
(1, "Mabee Business Building", "MBB"),
(2, "Foster Science Building", "FSB");
| true |
1bc0b5d9d1ebfed8d55d4910d9b59757e9f68a81 | SQL | bluesky0990/JSP_Project | /WebContent/SQL/each-table/board.sql | UHC | 243 | 3.15625 | 3 | [] | no_license | CREATE TABLE BOARD
(
ID NUMBER(2) NOT NULL
, NAME NVARCHAR2(20) NOT NULL
, CONSTRAINT BOARD_PK PRIMARY KEY
(
ID
)
ENABLE
);
COMMENT ON COLUMN BOARD.ID IS 'Խǹȣ';
COMMENT ON COLUMN BOARD.NAME IS 'Խ̸'; | true |
d3e95d4da9c5071aed1e4695905cbbf1f0aa785d | SQL | accuLucca/GymSystem | /database/academia.sql | UTF-8 | 1,569 | 3.578125 | 4 | [] | no_license | DROP DATABASE IF EXISTS academia;
CREATE DATABASE academia;
USE academia;
DROP TABLE IF EXISTS Aluno;
CREATE TABLE Aluno (
matricula INT PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR (100),
telefone CHAR (9),
email VARCHAR (50),
cpf CHAR (11),
nascimento DATE
);
DROP TABLE IF EXISTS Agenda;
CREATE... | true |
9b7ecf10d8f30636b8ed3451b875f9b1e92bdff2 | SQL | AlekseySugrobov/korus-weather-service | /src/main/resources/db/migration/V1__init_users_table.sql | UTF-8 | 480 | 3.28125 | 3 | [] | no_license | create table IF NOT EXISTS users
(
user_id varchar(255) not null
constraint users_pkey
primary key,
email varchar(255),
first_name varchar(255),
is_active boolean not null,
last_name varchar(255),
password varchar(255),
role varchar(255)
);
INSERT INTO users (user_id, email, first_name, is_active,... | true |
6ae893962c022de423bd18b93029245283b2e106 | SQL | aus23481/films-lara | /db.sql | UTF-8 | 4,802 | 3.40625 | 3 | [
"MIT"
] | permissive | /*
SQLyog Ultimate v9.20
MySQL - 5.5.5-10.1.28-MariaDB : Database - films
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CH... | true |
c206869aa10b9187fdb376b75bf7bd2d59ea5472 | SQL | centricconsulting/centric-edw-reference | /Database/Reference/Post Deployment/Seed.FiscalPeriod.sql | UTF-8 | 11,247 | 3.6875 | 4 | [] | no_license | /*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... | true |
e6c6b3d616ef51dcde88f2fd6c9ecb6d342b3f3a | SQL | Kaizu158/Avoir_Final | /avoir.sql | UTF-8 | 4,978 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2021 at 03:05 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
05a1118ee2b72f7020a0edf5354ecab4fa29ee16 | SQL | EdiCarlos/MyPractices | /SQLDatabase/SQLScripts/mysqlqueries/mydb/priya'query.sql | UTF-8 | 357 | 3.21875 | 3 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS `myinsert` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `myinsert`()
begin
declare i int default 1;
while (i < 100) do
insert into mydate(startdate, enddate) values(adddate(curdate(), interval i day), adddate(curdate(), interval (45 + i) day));
set i = i + 1;
end while;
select ... | true |
a3d208f19231d098e7000182e4099a3dda05929a | SQL | souleymane-kamara880/Projet-Espace-Membres | /bdconfig/EspaceMembre.sql | UTF-8 | 5,384 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : lun. 26 juil. 2021 à 03:23
-- Version du serveur : 10.3.16-MariaDB
-- Version de PHP : 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... | true |
a7b46ffd7fdb6575037d87b61fbc61fcecb2beaa | SQL | wshromoff/SOL | /Java/src/main/java/com/jostens/jemm2/jdbc/resources/DesignStatements.sql | UTF-8 | 1,879 | 4.15625 | 4 | [] | no_license |
-- Count rows in the DESIGN table
DESIGN_COUNT
{
select count(*)
from design
}
-- INSERT ROW INTO DESIGN_KEYWORD
INSERT_DESIGN_KEYWORD
{
INSERT INTO DESIGN_KEYWORD (DESIGN, KEYWORD_ID, SEQUENCE)
VALUES (?, ?, ?)
}
-- SELECT KEYWORD ID BASED ON KEYWORD
GET_KEYWORD_ID
{
SELECT ID FROM KEYWORD WHERE KEYWORD = '[... | true |
9af7ce6a1d0e486f9fa2dff026bf3b740940b9a9 | SQL | kisko15/B7IK21dbGyak | /B7IK21_1015/B7IK21_6.2.sql | UTF-8 | 776 | 2.921875 | 3 | [] | no_license | CREATE TABLE GYARTO
(adoszam INT NOT NULL,
nev VARCHAR(30) NOT NULL,
telephely VARCHAR(50) NOT NULL,
irsz VARCHAR(4) NOT NULL,
varos VARCHAR(40) NOT NULL,
utca VARCHAR(100) NOT NULL,
PRIMARY KEY (adoszam));
CREATE TABLE TERMEK
(tkod INT NOT NULL,
nev VARCHAR(50) NOT NULL,
ear INT CHECK (ear > 0) NOT NULL,
gyarto INT N... | true |
f30cad7056cbb20768bafeeece9096a28e9d4923 | SQL | generateui/MarkdownExtensions | /MarkdownExtension.MsSql/ForeignKeys.sql | UTF-8 | 735 | 3.921875 | 4 | [
"BSD-2-Clause"
] | permissive | SELECT obj.name AS [Name],
sch.name AS [SchemaName],
tab1.name AS [Table],
col1.name AS [Column],
tab2.name AS [ReferencedTable],
col2.name AS [ReferencedColumn]
FROM sys.foreign_key_columns fkc
INNER JOIN sys.objects obj ON obj.object_id = fkc.constraint_object_id
INNER JOIN sys.tables ta... | true |
43b11459d1b47c70ec00ddfa0484303ee6170dc9 | SQL | justinharrell/OmniLinkBridge | /OmnILinkBridge.sql | UTF-8 | 3,364 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 29, 2012 at 10:51 AM
-- Server version: 5.0.95
-- PHP Version: 5.2.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
ceeb35ae84da1ec4b4f7b29cc2c1bbc86457173b | SQL | UFOP-CSI477/2017-01-trabalho-final-barbara-eliza-vilela-lopes-e-manoel-goncalves-carneiro-junior | /TP-Barbara-Manoel/gestacao.sql | UTF-8 | 3,453 | 3.734375 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sun Aug 20 18:14:56 2017
-- 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='TR... | true |
f739c3c8081aaf10f90cb8502627810c37d5f558 | SQL | etoronsaye/2019-06-c-sharp-labs | /labs/SQL/SQL Create Database Table Insert Data.sql | UTF-8 | 430 | 2.75 | 3 | [
"MIT"
] | permissive |
drop database test02
drop table table_02
create database test02
create table table_02(
id int NOT NULL,
name nvarchar(50) NOT NULL,
date_of_birth DATETIME NULL
)
INSERT INTO table_02 VALUES (1, 'BOB', '2019-01-01 05:22:01.123')
/* new record but no name*/
INSERT INTO table_02 (id,name, date_of_birth) VALUES (2... | true |
c453363c27716de98c9d07a93a2f2477525e0b6a | SQL | SilvioMerz/Simple-Vote | /Documents/simple-vote.sql | UTF-8 | 2,702 | 3.390625 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Wed Jan 8 11:06:08 2020
-- 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, SQ... | true |
326def6e45e498554057d8da9453f5063766a81d | SQL | uygaryo2/Per-Title_encoding | /Data/pre-processing.sql | UTF-8 | 1,330 | 3.78125 | 4 | [] | no_license | WITH clip_data AS
(
SELECT
id AS 'clip_id',
duration AS 'clip_duration',
size as 'clip_size',
width AS 'clip_width',
height AS 'clip_height',
sample_aspect_ratio AS 'clip_sample_aspect_ratio',
display_aspect_ratio AS 'display_aspect_ratio',
bitrate_total AS 'c... | true |
70a04704a0214c8d3ec771f392fb808e5743ecfd | SQL | ivan196/MySQL | /practicas/zoo/ZOO.sql | UTF-8 | 760 | 3.609375 | 4 | [] | no_license | DROP DATABASE IF EXISTS ZOO;
CREATE DATABASE ZOO;
USE ZOO;
CREATE TABLE ZOO (
nombre VARCHAR(20),
ciudad VARCHAR(20),
pais VARCHAR(20),
tamaño VARCHAR(20),
presupuesto DECIMAL UNSIGNED,
PRIMARY KEY (nombre)
);
CREATE TABLE ESPECIE(
nomcientifico VARCHAR(20),
nombrevulgar VARCHAR(20) NOT NULL,
familia VA... | true |
6cb94f491c7e48290668ff23ea6a72ea43b72b6f | SQL | UFOP-CSI477/2016-02-atividades-martinsrso | /exercicio-extra-prova1/prova1-revisada/provas.sql | UTF-8 | 6,579 | 3.359375 | 3 | [
"MIT"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- Tue Jan 31 17:07:25 2017
-- 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='TR... | true |
f9eef4328b4ebb3141b59e6e96c1a2d1b8348e06 | SQL | Secular5/Big_Project | /Estore电商书店/es.sql | UTF-8 | 10,257 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 120.78.171.248
Source Server Version : 50725
Source Host : 120.78.171.248:3306
Source Database : es
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2019-11-05 11:37:19
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
60fce2441059d7b26e25cc7cc4eb62fcc2562b4a | SQL | RMarmol1/SpotifySampleDatabase | /Lab3_Query.sql | UTF-8 | 990 | 3.953125 | 4 | [] | no_license | -- #1 order number and total dollars of all orders
SELECT ordnum, totalUSD
FROM orders;
-- #2 name and city of agents named smith
SELECT name, city
FROM agents
WHERE name = 'Smith';
-- #3 id, name, and price of products greater than 208000
SELECT pid, name, priceUSD
FROM products
WHERE quantity > 208000;
--- #4 nam... | true |
7d1846fc3e2b12363813dcbf07d9ee620ce5396b | SQL | eznibe/north-telas | /db-scripts/upgrades/upgrade-19.sql | UTF-8 | 6,774 | 3.40625 | 3 | [] | no_license | -- TO RUN IN ARG DB BEFORE IMPORT BRA
ALTER TABLE boats modify column id int PRIMARY KEY NOT NULL AUTO_INCREMENT;
ALTER TABLE formulas modify column id int PRIMARY KEY NOT NULL AUTO_INCREMENT;
--ALTER TABLE groups modify column id int NOT NULL AUTO_INCREMENT;
ALTER TABLE sailgroups modify column id int NOT NULL AUTO... | true |
286c0df0f0c2a174b6952833ca9f4e3e6a4ccd3c | SQL | PeterYe100/CSC336-Project | /SQL_Scripts_with_comments/POPULATE_TABLES.sql | UTF-8 | 3,359 | 3.0625 | 3 | [] | no_license | -- These Scripts populate the entire database with our default entries for testing.
INSERT INTO
Users(UserID, FirstName, LastName, Phone, Email, Pass)
VALUES
(1, 'John', 'Doe', '212-254-6849', 'jdoe@gmail.com', 'pass'),
(2, 'Harry', 'Potter','917-234-3412' , 'hpotter@gmail.com', 'pass'),
(3, 'Ben', 'Wy... | true |
acc384ae2bb68f8dc65d2cc2aa0e374d4bb4279c | SQL | carlhabib/College-Management-System | /Queries Used/Admin Panel Queries.sql | UTF-8 | 1,654 | 3.515625 | 4 | [] | no_license | SELECT * FROM STUDENT;
SELECT * FROM STUDENT_COURSE WHERE S.studentID = selectedstudent.studentID;
INSERT INTO STUDENT VALUES(studentID, firstname, lastname, sex, dob, cGPA, majorGPA, minor, email, passwd, enrolledin, advisor);
DELETE FROM STUDENT WHERE studentID = selectedstudentID CASCADE;
SELECT * FROM FACULTY;
SEL... | true |
802b8e0b8c41a289769773885058057a584adfaf | SQL | nhatnpa2508/NhatModule02 | /9. Design and Create Database/Librarian/mydb_students.sql | UTF-8 | 2,263 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: mydb
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
e4af058a3ccc22e41706f70affb9ed58917d59cf | SQL | EkaterinaKaonashi/dev-edushechka | /DevEdu.API/DevEdu.Db/StoredProcedures/Student_Lesson/Student_Lesson_SelectByLessonAndUserId.sql | UTF-8 | 240 | 3.28125 | 3 | [] | no_license | CREATE PROCEDURE dbo.Student_Lesson_SelectByLessonAndUserId
@UserId int,
@LessonId int
AS
BEGIN
SELECT
Id,
IsPresent,
Feedback,
AbsenceReason
FROM dbo.Student_Lesson
WHERE UserId = @UserId AND LessonId = @LessonId
END | true |
f4e03de366456403c1590bd07c99a918ef1557e8 | SQL | khanhnguyenj/mvnForumJ | /mvnforum/sql/mvnForum_mysql.sql | UTF-8 | 32,262 | 3.21875 | 3 | [] | no_license |
# $Header: /cvsroot/mvnforum/mvnforum/sql/mvnForum_mysql.sql,v 1.57 2010/04/06 11:11:32 minhnn Exp $
# $Author: minhnn $
# $Revision: 1.57 $
# $Date: 2010/04/06 11:11:32 $
# Database : MySql
# Driver : com.mysql.jdbc.Driver or org.gjt.mm.mysql.Driver
# Url : jdbc:mysql://localhost/<database>?useUnicode=t... | true |
7dbeeb60a8be628d9674516d91a76f2cb346a6d3 | SQL | RosenW/training-projects | /RosenW-OnlineShop/onlineshopsql.sql | UTF-8 | 3,276 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.12
-- Dumped by pg_dump version 9.5.12
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
S... | true |
83aaf5e497b3dac6c46d48acf845b6fd644e2ba6 | SQL | margaiwangara/sidebar-project-PHP | /db/updated/codepiphany.sql | UTF-8 | 3,067 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2017 at 07:17 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 |
58aa01d99672e96fc010ddc13f8358c4b1870a36 | SQL | allwynmendes/SQL-Playground | /PLSQL/arrays.sql | UTF-8 | 1,423 | 4.25 | 4 | [] | no_license | /*PLSQL - ARRAY*/
set serveroutput on;
/*Simple PLSQL code demonstrating Array*/
DECLARE
type namesarray is varray(5) of varchar2(10);
type grades is varray(5) of integer;
names namesarray;
marks grades;
total integer;
BEGIN
names := namesarray('A', 'B', 'C', 'D', 'E');
marks := grades(10,... | true |
b8615e3cd653372f0bfa7d888bf9822c4b5c4552 | SQL | lanaflonPerso/ENI-Project-s | /Stored Procedure with PL-SQL/correc_TP/Chapitre 2/2.14.sql | UTF-8 | 316 | 3.640625 | 4 | [] | no_license | SELECT exemplaires.isbn
FROM emprunts inner join details on details.emprunt=emprunts.numero
inner join exemplaires on details.exemplaire=exemplaires.numero
AND details.isbn=exemplaires.isbn
WHERE MONTHS_BETWEEN(emprunts.creele, sysdate)<12
GROUP BY exemplaireS.isbn
HAVING count(*)>10;
| true |
e694be18cb83a188c07e9bf375e5226ec261c4c1 | SQL | nilsys/Oracle | /Scripts/performance/check_memory2.sql | UTF-8 | 1,029 | 3.578125 | 4 | [] | no_license | Total Size:
-- The view (V$sga) display summary information about the system global area (SGA).
*Name: Sga component group
*Value: Memory size (in bytes)
select sum(value)/1024/1024/1024 Total_size_In_GB from V$sga
=================================================================
Free Size
The View (V$SGASTAT) display... | true |
668e80888f7cb61f8d3c9fd04b6ed6f90fb2c0d9 | SQL | TheHiddenHaku/hubvoghera-corso-web-development | /_bk/webdev101.sql | UTF-8 | 1,419 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 08, 2014 alle 16:17
-- Versione del server: 5.6.15
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
b70318f7ce25031cd28507bd953b7bd8ded443e2 | SQL | AngeloK/chatroom | /chatroom.sql | UTF-8 | 571 | 3.265625 | 3 | [] | no_license |
SET SESSION storage_engine = "InnoDB";
SET SESSION time_zone = "+0:00";
ALTER DATABASE CHARACTER SET "utf8";
DROP TABLE IF EXISTS messages;
CREATE TABLE messages (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL REFERENCES user(id),
body VARCHAR(512) NOT NULL,
created_at DATETIME NOT ... | true |
449091eb513557ab5c63fcf1fa77a416fd44f3c9 | SQL | kleberpinel/vrify | /vrify_2.sql | UTF-8 | 174 | 2.828125 | 3 | [] | no_license | -- Query
SELECT
c.ID,
c.NAME
FROM
Customers c
INNER JOIN
Customer_Addresses ca
ON c.ID = ca.CUSTOMER_ID
-- Result
-- ID NAME
-- 2 Jonathan
-- 3 Colin
-- 1 Ryan
| true |
ce5694a671f35374ede0c8704a99582e7df52f8f | SQL | iqiangzi/ccu | /guo/install/setup40.sql | GB18030 | 11,544 | 3.21875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `#@__accounts` (
`id` smallint(8) NOT NULL auto_increment,
`atype` varchar(10) NOT NULL,
`amoney` double NOT NULL,
`abank` smallint(6) NOT NULL,
`dtime` datetime NOT NULL default '0000-00-00 00:00:00',
`apeople` varchar(10) NOT NULL,
`atext` text NOT NULL,
PRIMARY KEY (`id`)
... | true |
1c26ba26752a8bac6d2b1fc8a6791e754f1f8746 | SQL | shayanali4/tambola | /reactify-v2.2.0/redux-saga/dbscript/final-version/script-v0001.sql | UTF-8 | 6,407 | 3.96875 | 4 | [] | no_license | ALTER TABLE `game`
ADD COLUMN `gameprice` TEXT NULL AFTER `called_numbers`;
DROP procedure IF EXISTS `USPgamesave`;
DELIMITER $$
CREATE PROCEDURE `USPgamesave`(IN `product_id` INT, `product_status` VARCHAR(10), `product_createdbyid` INT, IN `client_id` INT, `product_launchdate` DATETIME, `product_drawsequence` LONG... | true |
9abc159cd98e63fb95d8995b271ae77340e3b706 | SQL | pwarren88/PatStore | /PatStoreDB/dbo/Scripts/Script.AddProducts.sql | UTF-8 | 1,127 | 2.765625 | 3 | [] | no_license | /*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... | true |
503b068cd0f7c835e838f1a505fe65730631cfce | SQL | KyleQiao1992/pony_selfservice | /src/main/resources/sqlchange/sql.sql | UTF-8 | 3,464 | 3.671875 | 4 | [] | no_license |
/**
* 不用做配置文件,仅做sql同步使用
*
* @author: qiaoyi
* @edit:
* @created:17/2/14
*/
CREATE TABLE `test`.`category` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`name` VARCHAR (512) NULL COMMENT '类目名称',
`type` VARCHAR (3) NOT NULL COMMENT '1:一级类目,2:二级类目 3:三级类目',
`parent` VARCHAR (10) NOT NULL COMMENT '父节点',... | true |
8d614d1a3ba486087594b4a675a250b4bc4f8c51 | SQL | rabdys/PLSQLSOURCES | /PT - Documentación de proyectos Peoplesoft.sql | UTF-8 | 6,950 | 3.15625 | 3 | [] | no_license |
-- CONSULTAS PARA BASE DE DCOMUENTACI�N DE PROYECTOS PEOPLESOFT.
-- RAUL BARRIOS
-- 20180905
-- VERSION 1.0.0
-- PARA BUSCAR LAS TABLAS DE DEFINCI�N DE OBJETOS DE PEOPLE SOFT
select * from DBA_TABLES WHERE TABLE_NAME LIKE '%CODE%' AND TABLE_NAME LIKE '%DEFN%' ORDER BY 2 ;
select * from DBA_TABLES WHERE TABLE... | true |
0cb6178ca9cc2f5c6803f1b9b7f7dc670bce5c94 | SQL | arti-karnik/Technology-StopAndBlog | /config/schema.sql | UTF-8 | 1,094 | 3.84375 | 4 | [] | no_license |
DROP DATABASE IF EXISTS blogdb;
CREATE DATABASE blogdb;
CREATE TABLE `blog` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`content` text NOT NULL,
`create_date` datetime NOT NULL,
`update_date` datetime DEFAULT NULL,
`user_id` int DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`... | true |
e068d2e81a011c3204efe3929a8221faaa12f449 | SQL | blu19/Employee-Tracker-CMS | /schema.sql | UTF-8 | 839 | 3.75 | 4 | [] | no_license | DROP DATABASE IF EXISTS human_resources_db;
CREATE DATABASE human_resources_db;
USE human_resources_db;
CREATE TABLE department
(
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30)
);
CREATE TABLE role
(
id INTEGER AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(30),
salary DECIMAL,
department_id... | true |
1ca34edd4f2d13a423324f23664d9f4d626825b8 | SQL | Djn94/Bamazon | /sql.sql | UTF-8 | 764 | 3.015625 | 3 | [] | no_license | DROP TABLE products;
CREATE DATABASE IF NOT EXISTS products_db;
USE products_db;
CREATE TABLE IF NOT EXISTS products (
id INT NOT NULL AUTO_INCREMENT,
prod_name VARCHAR(45) NOT NULL,
depart_name VARCHAR(45) NOT NULL,
cost INTEGER (8) NOT NULL,
stock INTEGER (4) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO prod... | true |
9255f8ac5ea3666531e368a13f765c341f15ed35 | SQL | valerielim/Google-Dsquared | /SQL Projects/SQLEx4.sql | UTF-8 | 2,334 | 4.4375 | 4 | [] | no_license | -- Title: SQL Practice Exercises
-- Made by Valerie Lim
-- Date: 28 July 2017
-- Contents: JOINS, 2-way, 3-way
# ------------------------------- EXERCISE 4 ------------------------------- #
-- Qn1a
-- For each department, display the department name, city, and state province.
SELECT D.DEPARTMENT_NAME, L.CITY, L.STAT... | true |
be2d5d5ef6aa194ba0277132f40ab9fee54a1e1b | SQL | Felipeosouz/Empresa-Junior | /Site empresarial com login/banco/advocacia.sql | UTF-8 | 3,973 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 31-Maio-2020 às 07:04
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
e90e48e645df1686a991feef74f49f840249772c | SQL | KfirWilfand/Bootcamp | /week11/advSQL/ex1.sql | UTF-8 | 1,299 | 3.734375 | 4 | [] | no_license | create database programs;
use programs;
CREATE TABLE participants (
participant_id INT not null auto_increment,
first_name VARCHAR(20) not null,
last_name VARCHAR(20) not null,
country VARCHAR(20) not null,
gender enum('female', 'male'),
english_level INT,
is_israeli BOOLEAN not null default 0... | true |
a2f9ce7f9b4caca2c6c6edb60e1800328c574e50 | SQL | dariusz-popis/mssql | /landing-zone/D2-Ex05-Case.sql | UTF-8 | 990 | 3.46875 | 3 | [] | no_license | SELECT *
FROM
(
SELECT DISTINCT
CASE MONTH(OrderDate)
WHEN 1 THEN 'Martwo'
WHEN 2 THEN 'Martwo'
WHEN 3 THEN 'Martwo'
WHEN 4 THEN 'Pomalutku'
WHEN 5 THEN 'Pomalutku'
WHEN 6 THEN 'Sie zarabia zyje sie jak chrabia'
WHEN 7 THEN 'Sie za... | true |
651948b3509c1fdb90847e7914d9d6b5f7bf9797 | SQL | Ablrt/Simple-Sport-Complex-Database- | /Sport Complex/sport_complex_customer_section.sql | UTF-8 | 2,512 | 2.921875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: sport_complex
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... | true |
5bbf19154a4673ad46094ecb4d19cba8d1db954c | SQL | JoshuaCochran/File-Structures-and-Database-Systems-Project | /professors [b].sql | UTF-8 | 111 | 2.671875 | 3 | [] | no_license | SELECT grade, COUNT(student_CWID)
FROM cs332f9.enrollment_record
WHERE CRN = 18982 AND SNO = 01
GROUP BY grade; | true |
607feb26a299179708d4e4302a1cb7e9c9fa74b5 | SQL | Bhawna/shopping_cart | /shopping_api.sql | UTF-8 | 3,468 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 24, 2016 at 09:32 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
472361f270a3baa5fa8e00c5e6a755f97b2ecd07 | SQL | wallyliu2/webTrafficAnalytics | /6-2_TimetoRepeat.sql | UTF-8 | 911 | 4.15625 | 4 | [] | no_license | USE mavenfuzzyfactory;
CREATE TEMPORARY TABLE user_first_sessions_2
SELECT user_id, created_at FROM website_sessions
WHERE created_at < '2014-11-03' AND created_at >= '2014-01-01' AND is_repeat_session=0;
SELECT * FROM user_first_sessions_2;
CREATE TEMPORARY TABLE user_sec_sessions
SELECT user_id, MIN(created_at) ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.